Browse Source

fix on some operations

making of shared pointers

cbor return of binaries
master
Ludovic 'Archivist' Lagouardette 3 years ago
parent
commit
d7d7720b07
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      include/gp/ipc/envelope/cbor.hpp
  2. +1
    -1
      include/gp/utils/pointers.hpp

+ 1
- 1
include/gp/ipc/envelope/cbor.hpp View File

@ -313,7 +313,7 @@ namespace gp {
for(auto it = new_state.begin(); it != end_it; it++) { for(auto it = new_state.begin(); it != end_it; it++) {
return_value.push_back(*it); return_value.push_back(*it);
} }
return {optional<gp::vector<char>>(gp::move(return_value)), parsing_state(new_state.begin() + size.value(), new_state.end())};
return {return_value, parsing_state(new_state.begin() + size.value(), new_state.end())};
break; break;
} }
default: break; default: break;

+ 1
- 1
include/gp/utils/pointers.hpp View File

@ -82,7 +82,7 @@ namespace gp {
shared_ptr(T* _data, gp::allocator& _owner) shared_ptr(T* _data, gp::allocator& _owner)
: data(_data) : data(_data)
, refcounter((std::atomic_int*)owner.allocate(sizeof(std::atomic_int)))
, refcounter((std::atomic_int*)_owner.allocate(sizeof(std::atomic_int)))
, owner(_owner) , owner(_owner)
{ {
refcounter->store(1); refcounter->store(1);

Loading…
Cancel
Save