Why this function just decides to not call another function and do its thing instead?

solidstate1991 laszloszeremi at outlook.com
Sat Sep 17 15:04:48 UTC 2022


Code found here: 
https://github.com/ZILtoid1991/newxml/blob/main/source/newxml/domimpl.d#L1984

Even changing the code to this:

```d
auto res = firstAttr;
     while (res)
     {
         if (res.localName != localName || res.namespaceURI != 
namespaceURI)
             res = res._nextAttr;
         else
             break;
     }
     return res;
```

Does not always seem to call this: 
https://github.com/ZILtoid1991/newxml/blob/main/source/newxml/domstring.d#L252

And then instead just decides that the `localName` and 
`namespaceURI` pairs are not equal, and in those cases the Visual 
Studio debugger doesn't detect any entering into any of the 
`DOMString.equals` overrides, all while the debugger shows those 
strings are equal.


More information about the Digitalmars-d-learn mailing list