Skip to content

Commit

Permalink
Change to use TryGetValue
Browse files Browse the repository at this point in the history
  • Loading branch information
dellis1972 committed Jul 17, 2018
1 parent 9768695 commit 6394c4c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ void FixupResources (ITaskItem item, Dictionary<string, string> acwMap)
string targetfile = file;
if (targetfile.StartsWith (resdir, StringComparison.InvariantCultureIgnoreCase)) {
targetfile = file.Substring (resdir.Length).TrimStart (Path.DirectorySeparatorChar);
targetfile = resource_name_case_map.ContainsKey (targetfile) ? resource_name_case_map [targetfile] : targetfile;
string temp;
if (resource_name_case_map.TryGetValue (targetfile, out temp))
targetfile = temp;
targetfile = Path.Combine ("Resources", targetfile);
}
switch (t) {
Expand Down

0 comments on commit 6394c4c

Please sign in to comment.