0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

ircd::json: Add shortcut equality comparison for two serialized values.

This commit is contained in:
Jason Volk 2019-07-29 16:46:15 -07:00
parent 1726a0a698
commit b191b153e3

View file

@ -3827,6 +3827,9 @@ ircd::json::operator<(const value &a, const value &b)
bool
ircd::json::operator==(const value &a, const value &b)
{
if(a.serial && b.serial)
return string_view(a) == string_view(b);
if(type(a) == type(b)) switch(type(b))
{
case NUMBER: