We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06d4e28 commit 941066eCopy full SHA for 941066e
Orm/Xtensive.Orm/Modelling/Comparison/Hints/HintSet.cs
@@ -193,11 +193,9 @@ public bool HasHints<THint>(Node node)
193
{
194
ArgumentValidator.EnsureArgumentNotNull(node, "node");
195
196
- if (!hintMap.ContainsKey(node))
197
- hintMap.Add(node, new Dictionary<Type, object>());
198
- var nodeHintMap = hintMap.GetValueOrDefault(node);
199
- if (nodeHintMap == null)
200
- return false;
+ if (!hintMap.TryGetValue(node, out var nodeHintMap)) {
+ hintMap.Add(node, nodeHintMap = new Dictionary<Type, object>());
+ }
201
return nodeHintMap.ContainsKey(typeof(THint));
202
}
203
@@ -260,4 +258,4 @@ private HintSet()
260
258
261
259
262
263
-}
+}
0 commit comments