Skip to content

Replaces instances of ContainsKey+hash lookup with TryGetValue

Mateusz Brawański requested to merge github/fork/uwx/patch-103 into master

Created by: uwx

Summary

Replaces instances of ContainsKey followed by a dictionary indexing operation, with a call to TryGetValue.

Details

This turns what would normally be 2 hash lookups into a single one. I probably missed some files but these are I suppose the most important ones.

Changes proposed

  • Use TryGetValue instead of ContainsKey+lookup in DiscordClient, DiscordChannel, DiscordGuild and DiscordUser.

Notes

Yada yada yada I haven't tested this yet and I will soon yada yada yada

Merge request reports

Loading