Skip to content

Commit

Permalink
Merge pull request #5818 from maloel/json
Browse files Browse the repository at this point in the history
revert void*->char* change to preserve backwards compat
  • Loading branch information
ev-mp authored Feb 10, 2020
2 parents 10da58e + 26230f0 commit d3980b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/librealsense2/h/rs_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ void rs2_set_calibration_table(const rs2_device* device, const void* calibration
rs2_raw_data_buffer* rs2_serialize_json(rs2_device* dev, rs2_error** error);

/* Load JSON and apply advanced-mode controls */
void rs2_load_json(rs2_device* dev, const char* json_content, unsigned content_size, rs2_error** error);
void rs2_load_json(rs2_device* dev, const void* json_content, unsigned content_size, rs2_error** error);

#ifdef __cplusplus
}
Expand Down
4 changes: 2 additions & 2 deletions src/rs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2834,11 +2834,11 @@ rs2_raw_data_buffer* rs2_serialize_json(rs2_device* dev, rs2_error** error) BEGI
}
HANDLE_EXCEPTIONS_AND_RETURN(nullptr, dev)

void rs2_load_json(rs2_device* dev, const char* json_content, unsigned content_size, rs2_error** error) BEGIN_API_CALL
void rs2_load_json(rs2_device* dev, const void* json_content, unsigned content_size, rs2_error** error) BEGIN_API_CALL
{
VALIDATE_NOT_NULL(dev);
VALIDATE_NOT_NULL(json_content);
auto serializable = VALIDATE_INTERFACE(dev->device, librealsense::serializable_interface);
serializable->load_json(json_content);
serializable->load_json(std::string(static_cast<const char*>(json_content), content_size));
}
HANDLE_EXCEPTIONS_AND_RETURN(, dev, json_content, content_size)

0 comments on commit d3980b2

Please sign in to comment.