Comparing two invalid Entities should always return true
Every time a new invalid Entity is constructed, it's assigned a decremental negative number. Since two invalid Entities always have different negative numbers, simple Item() == Item() comparision would return false, as internally only IDs were compared. From logical point of view it makes however sense for invalid Entities to be considered equal. As of now, operator==() and operator!=() takes entity validity in consideration, so Item() == Item() is always true and Item() != Item() is always false.
parent
6e9ddc24
Please register or sign in to comment