1
0
Fork 0

added some constructors for Json with TRI_json_t const* as arg.

This commit is contained in:
James 2014-08-25 13:05:48 +02:00
parent c801fc4992
commit 09f945eaf7
1 changed files with 10 additions and 0 deletions

View File

@ -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