aboutsummaryrefslogtreecommitdiff
path: root/src/univalue/lib/univalue.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-09-07 08:22:00 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-09-07 08:21:14 -0400
commitfaad55a9a24601aac47b5e3bc44827ddb41d8f93 (patch)
tree2608058e723256ed51a68b3048af1ae61b03d8ea /src/univalue/lib/univalue.cpp
parent4799b0932a10c5a48706700a07899b33ef9c8bae (diff)
parentdc287c98f8b33576f3c71db02a232106ef0e57d9 (diff)
Update univalue subtree
Diffstat (limited to 'src/univalue/lib/univalue.cpp')
-rw-r--r--src/univalue/lib/univalue.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/univalue/lib/univalue.cpp b/src/univalue/lib/univalue.cpp
index d8ad7c4b90..4c9c15d63e 100644
--- a/src/univalue/lib/univalue.cpp
+++ b/src/univalue/lib/univalue.cpp
@@ -10,8 +10,6 @@
#include "univalue.h"
-using namespace std;
-
const UniValue NullUniValue;
void UniValue::clear()
@@ -37,15 +35,15 @@ bool UniValue::setBool(bool val_)
return true;
}
-static bool validNumStr(const string& s)
+static bool validNumStr(const std::string& s)
{
- string tokenVal;
+ std::string tokenVal;
unsigned int consumed;
enum jtokentype tt = getJsonToken(tokenVal, consumed, s.data(), s.data() + s.size());
return (tt == JTOK_NUMBER);
}
-bool UniValue::setNumStr(const string& val_)
+bool UniValue::setNumStr(const std::string& val_)
{
if (!validNumStr(val_))
return false;
@@ -58,7 +56,7 @@ bool UniValue::setNumStr(const string& val_)
bool UniValue::setInt(uint64_t val_)
{
- ostringstream oss;
+ std::ostringstream oss;
oss << val_;
@@ -67,7 +65,7 @@ bool UniValue::setInt(uint64_t val_)
bool UniValue::setInt(int64_t val_)
{
- ostringstream oss;
+ std::ostringstream oss;
oss << val_;
@@ -76,7 +74,7 @@ bool UniValue::setInt(int64_t val_)
bool UniValue::setFloat(double val_)
{
- ostringstream oss;
+ std::ostringstream oss;
oss << std::setprecision(16) << val_;
@@ -85,7 +83,7 @@ bool UniValue::setFloat(double val_)
return ret;
}
-bool UniValue::setStr(const string& val_)
+bool UniValue::setStr(const std::string& val_)
{
clear();
typ = VSTR;