diff options
author | Loïc Collignon <loic.collignon@iot.bzh> | 2018-06-07 15:05:53 +0200 |
---|---|---|
committer | Stephane Desneux <stephane.desneux@iot.bzh> | 2018-06-12 16:23:44 +0200 |
commit | 9a631c30c9c8792865ce2aa0ec06a1bb5fd16751 (patch) | |
tree | e1bd8c4ce3cc408144aedcf0f26fd873d8db8634 /ahl-binding/jsonc_utils.hpp | |
parent | 322f8932476eda944c7d3ac65eafde12c69b2ae9 (diff) |
Add some policy emulation
Add a very simplistic policy emulation just for demo.
The real policy engine will be brought back soon.
Change-Id: I6f77c8dc58ba335eabd1a1d858354a84559d9e7f
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'ahl-binding/jsonc_utils.hpp')
-rw-r--r-- | ahl-binding/jsonc_utils.hpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ahl-binding/jsonc_utils.hpp b/ahl-binding/jsonc_utils.hpp index 02e113b..5e82fca 100644 --- a/ahl-binding/jsonc_utils.hpp +++ b/ahl-binding/jsonc_utils.hpp @@ -31,6 +31,7 @@ inline T& jcast(T& v, json_object* o) template<class T> inline T& jcast_array(T& v, json_object* o) { + if (o == nullptr) return v; auto sz = json_object_array_length(o); for(auto i = 0; i < sz ; ++i) { |