summaryrefslogtreecommitdiffstats
path: root/jext.h
diff options
context:
space:
mode:
authorfireice-uk <fireice2@o2.pl>2017-01-02 12:51:13 +0000
committerfireice-uk <fireice2@o2.pl>2017-01-02 12:51:13 +0000
commit6368ab745532d273775875f16a6053fb79586bc1 (patch)
treeeb472eebbbfc700662e150c7dfe17338678de794 /jext.h
parent1384d2654117a4e9f5d2e34e74a872f1d551e22b (diff)
downloadxmr-stak-6368ab745532d273775875f16a6053fb79586bc1.zip
xmr-stak-6368ab745532d273775875f16a6053fb79586bc1.tar.gz
First!
Diffstat (limited to 'jext.h')
-rw-r--r--jext.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/jext.h b/jext.h
new file mode 100644
index 0000000..dce73a0
--- /dev/null
+++ b/jext.h
@@ -0,0 +1,13 @@
+#pragma once
+
+using namespace rapidjson;
+
+/* This macro brings rapidjson more in line with other libs */
+inline const Value* GetObjectMember(const Value& obj, const char* key)
+{
+ Value::ConstMemberIterator itr = obj.FindMember(key);
+ if (itr != obj.MemberEnd())
+ return &itr->value;
+ else
+ return nullptr;
+}
OpenPOWER on IntegriCloud