From cc429b68fadc502b981fd0acd64a5ff6e2ae1d15 Mon Sep 17 00:00:00 2001 From: psychocrypt Date: Fri, 29 Sep 2017 20:32:31 +0200 Subject: group files - move source code to `src` - categorize files and move to group folder - change upper case class files to lower case - change C++ header to `*.hpp` --- xmrstak/misc/jext.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 xmrstak/misc/jext.hpp (limited to 'xmrstak/misc/jext.hpp') diff --git a/xmrstak/misc/jext.hpp b/xmrstak/misc/jext.hpp new file mode 100644 index 0000000..dce73a0 --- /dev/null +++ b/xmrstak/misc/jext.hpp @@ -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; +} -- cgit v1.1