MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / clear

Method clear

include/behaviortree_cpp/contrib/any.hpp:158–165  ·  view source on GitHub ↗

If not empty, destroys the contained object.

Source from the content-addressed store, hash-verified

156
157 /// If not empty, destroys the contained object.
158 void clear() noexcept
159 {
160 if(!empty())
161 {
162 this->vtable->destroy(storage);
163 this->vtable = nullptr;
164 }
165 }
166
167 /// Returns true if *this has no contained object, otherwise false.
168 bool empty() const noexcept

Callers 11

~anyMethod · 0.95
from_jsonFunction · 0.45
~input_stream_adapterMethod · 0.45
get_characterMethod · 0.45
resetFunction · 0.45
get_cbor_objectMethod · 0.45
get_msgpack_objectMethod · 0.45
get_ubjson_objectMethod · 0.45
destroyFunction · 0.45
clearFunction · 0.45

Calls 2

emptyFunction · 0.85
destroyMethod · 0.45

Tested by

no test coverage detected