mirror of https://gitee.com/bigwinds/arangodb
added some constructors for Json with TRI_json_t const* as arg.
This commit is contained in:
parent
c801fc4992
commit
09f945eaf7
|
@ -432,6 +432,7 @@ namespace triagens {
|
|||
if (_json == nullptr) {
|
||||
throw JsonException("Json: out of memory");
|
||||
}
|
||||
std::cout << "SHOULDN'T BE HERE!\n";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -538,7 +539,16 @@ namespace triagens {
|
|||
: _zone(z), _json(j), _autofree(autofree) {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief constructor for a memzone and a const TRI_json_t*
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
explicit Json (TRI_memory_zone_t* z, TRI_json_t const* j, autofree_e autofree = NOFREE)
|
||||
: _zone(z), _json(const_cast<TRI_json_t*>(j)), _autofree(autofree) {
|
||||
}
|
||||
|
||||
explicit Json (TRI_json_t* j) = delete;
|
||||
explicit Json (TRI_json_t const *) = delete;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief "copy" constructor, note that in the AUTOFREE case this steals
|
||||
|
|
Loading…
Reference in New Issue