Skip to content

Commit

Permalink
Add version info, update to 0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jharmer95 committed Jan 19, 2022
1 parent 65e8c86 commit 57dfa6c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cmake_minimum_required(VERSION 3.16)

project(
"rpc.hpp"
VERSION 0.6.2
VERSION 0.7.1
DESCRIPTION "Simple RPC Header-Only Library"
LANGUAGES CXX
)
Expand Down
5 changes: 4 additions & 1 deletion include/rpc.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
///@file rpc.hpp
///@author Jackson Harmer ([email protected])
///@brief Header-only library for serialized RPC usage
///@version 0.6.2
///@version 0.7.1
///
///@copyright
///BSD 3-Clause License
Expand Down Expand Up @@ -71,6 +71,9 @@
///@brief Top-level namespace for rpc.hpp classes and functions
namespace rpc
{
///@brief Array containing the version information for rpc.hpp
static constexpr unsigned version[]{ 0, 7, 1 };

namespace exceptions
{
enum class Type
Expand Down
8 changes: 4 additions & 4 deletions include/rpc_adapters/rpc_boost_json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ template<typename R, typename... Args>
object_t obj{};
obj["func_name"] = pack.get_func_name();

auto& args = ret_j["args"].emplace_array();
auto& args = obj["args"].emplace_array();
args.reserve(sizeof...(Args));

const auto& argTup = pack.get_args();
Expand All @@ -286,7 +286,7 @@ template<typename R, typename... Args>
}
}

return ret_j;
return obj;
}

template<>
Expand Down Expand Up @@ -318,7 +318,7 @@ template<typename R, typename... Args>
}
else
{
if (obj.contains("result") && !obj["result"].is_null())
if (obj.contains("result") && !obj.at("result").is_null())
{
return ::rpc::details::packed_func<R, Args...>(obj.at("func_name").get_string().c_str(),
adapters::boost_json::details::parse_arg<R>(obj.at("result")),
Expand All @@ -331,7 +331,7 @@ template<typename R, typename... Args>

if (obj.contains("except_type"))
{
pack.set_exception(obj.at("err_mesg").get_string.c_str(),
pack.set_exception(obj.at("err_mesg").get_string().c_str(),
static_cast<exceptions::Type>(obj.at("except_type").get_int64()));
}

Expand Down

0 comments on commit 57dfa6c

Please sign in to comment.