aboutsummaryrefslogtreecommitdiff
path: root/src/unstable/json.cpp
diff options
context:
space:
mode:
authorMike Buland <mbuland@penny-arcade.com>2019-06-13 12:25:25 -0700
committerMike Buland <mbuland@penny-arcade.com>2019-06-13 12:25:25 -0700
commit8ba8268b51081b3b7d34da8fcec14d58b53f6d47 (patch)
tree25dd6b2c13d4b5cc1f6088e5c3c8a7a356ade37c /src/unstable/json.cpp
parent889cf794108dc1a8c4d2c50fc864846799f512e1 (diff)
downloadlibbu++-8ba8268b51081b3b7d34da8fcec14d58b53f6d47.tar.gz
libbu++-8ba8268b51081b3b7d34da8fcec14d58b53f6d47.tar.bz2
libbu++-8ba8268b51081b3b7d34da8fcec14d58b53f6d47.tar.xz
libbu++-8ba8268b51081b3b7d34da8fcec14d58b53f6d47.zip
Added string comparison operator to json.
Diffstat (limited to 'src/unstable/json.cpp')
-rw-r--r--src/unstable/json.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/unstable/json.cpp b/src/unstable/json.cpp
index 7e6387b..d3d8535 100644
--- a/src/unstable/json.cpp
+++ b/src/unstable/json.cpp
@@ -525,6 +525,14 @@ Bu::Json &Bu::Json::operator=( const Bu::Json &rSrc )
525 return *this; 525 return *this;
526} 526}
527 527
528bool Bu::Json::operator==( const Bu::String &rRhs )
529{
530 if( eType != String )
531 return false;
532
533 return (*uDat.pString) == rRhs;
534}
535
528void Bu::Json::parseString( Bu::UtfChar &c, Bu::Stream &sInput, 536void Bu::Json::parseString( Bu::UtfChar &c, Bu::Stream &sInput,
529 Bu::UtfString &sOut ) 537 Bu::UtfString &sOut )
530{ 538{