Because deprecation ValueTree::invalid

if (vt==ValueTree::invalid)
the same as
if (vt==ValueTree())

PS: yes i may should use .isValid(), but i have to replace ca. 200 occurances, so its easier to search/replace ValueTree::invalid / ValueTree()

Yes, it’s the same.

…though I have to say that when I have to refactor stuff like that, it’s almost always best to go through and fix each instance properly by hand rather than just doing a search-replace.

Apart from the fact that search-replace is a bit risky in terms of creating accidental bugs, if you have to change 200 instances of something, it makes you much more aware of things that could probably be DRYed.