Merge branch 'master' of https://github.com/Hackerpilot/Dscanner
Conflicts: stdx/lexer.d
This commit is contained in:
commit
1536ed722b
|
@ -819,6 +819,11 @@ public:
|
||||||
* amount of work necessary when lexing dynamic tokens.
|
* amount of work necessary when lexing dynamic tokens.
|
||||||
*/
|
*/
|
||||||
string intern(const(ubyte)[] str, uint hash) pure nothrow @safe
|
string intern(const(ubyte)[] str, uint hash) pure nothrow @safe
|
||||||
|
in
|
||||||
|
{
|
||||||
|
assert (str.length > 0);
|
||||||
|
}
|
||||||
|
body
|
||||||
{
|
{
|
||||||
return _intern(str, hash);
|
return _intern(str, hash);
|
||||||
}
|
}
|
||||||
|
@ -882,7 +887,7 @@ private:
|
||||||
shared(Node)* node = buckets[index];
|
shared(Node)* node = buckets[index];
|
||||||
while (node !is null)
|
while (node !is null)
|
||||||
{
|
{
|
||||||
if (node.hash >= hash && bytes == cast(ubyte[]) node.str)
|
if (node.hash >= hash && bytes.equal(cast(ubyte[]) node.str))
|
||||||
{
|
{
|
||||||
found = true;
|
found = true;
|
||||||
return node;
|
return node;
|
||||||
|
|
Loading…
Reference in New Issue