C#: Fix length/emptiness checks

This commit is contained in:
Tamas Vajk
2020-10-02 09:48:58 +02:00
parent 83d6d6041a
commit 2d3985742f
4 changed files with 5 additions and 5 deletions

View File

@@ -65,7 +65,7 @@ namespace Semmle.Extraction.CIL.Entities
static Namespace? createParentNamespace(Context cx, string fqn)
{
if (fqn == "") return null;
if (fqn.Length == 0) return null;
var i = fqn.LastIndexOf('.');
return i == -1 ? cx.GlobalNamespace : cx.Populate(new Namespace(cx, fqn.Substring(0, i)));
}