Skip to content
Snippets Groups Projects
Commit dc52416a authored by Andrea Censi's avatar Andrea Censi
Browse files

No commit message

No commit message
parent a0e722cb
No related branches found
No related tags found
No related merge requests found
...@@ -204,17 +204,6 @@ INSTALL(PROGRAMS hsm_test00 DESTINATION bin) ...@@ -204,17 +204,6 @@ INSTALL(PROGRAMS hsm_test00 DESTINATION bin)
ENDIF(COMPILE_HSM) ENDIF(COMPILE_HSM)
IF(COMPILE_STRUCTPRIOR)
INCLUDE_DIRECTORIES(/sw/include)
LINK_DIRECTORIES(/sw/lib)
ADD_EXECUTABLE(structprior ./csm/structprior/structprior_test.cpp)
TARGET_LINK_LIBRARIES(structprior csm-static)
INSTALL(PROGRAMS structprior DESTINATION bin)
ENDIF(COMPILE_STRUCTPRIOR)
SUBDIRS(pkg-config) SUBDIRS(pkg-config)
......
...@@ -257,6 +257,9 @@ int jo_read_int(JO jo, const char*name, int*p) { ...@@ -257,6 +257,9 @@ int jo_read_int(JO jo, const char*name, int*p) {
double convert_to_double(JO jo) { double convert_to_double(JO jo) {
if(json_object_is_type(jo, (enum json_type) json_type_double)) if(json_object_is_type(jo, (enum json_type) json_type_double))
return json_object_get_double(jo); return json_object_get_double(jo);
else if(json_object_is_type(jo, (enum json_type) json_type_int)) {
return json_object_get_int(jo);
}
else else
return NAN; return NAN;
} }
......
...@@ -44,6 +44,7 @@ void jo_add_string (JO parent, const char*name, const char*v); ...@@ -44,6 +44,7 @@ void jo_add_string (JO parent, const char*name, const char*v);
/** Return 0 if there isn't a field called 'name' */ /** Return 0 if there isn't a field called 'name' */
int jo_read_int (JO parent, const char*name, int*p) ; int jo_read_int (JO parent, const char*name, int*p) ;
/** This also tolerates an integer */
int jo_read_double (JO parent, const char*name, double*p); int jo_read_double (JO parent, const char*name, double*p);
/* Returns 0 if there isn't a field called "name", or it's not an array, or /* Returns 0 if there isn't a field called "name", or it's not an array, or
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment