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:
parent
1726a0a698
commit
b191b153e3
1 changed files with 3 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue