XObject::host_object -> XObject::is_host_object
This commit is contained in:
parent
1e36ea8b69
commit
7e88e54cbe
|
@ -610,7 +610,7 @@ bool KernelState::Save(ByteStream* stream) {
|
||||||
auto prev_offset = stream->offset();
|
auto prev_offset = stream->offset();
|
||||||
|
|
||||||
stream->Write((uint32_t)object->type());
|
stream->Write((uint32_t)object->type());
|
||||||
if (!object->host_object() && !object->Save(stream)) {
|
if (!object->is_host_object() && !object->Save(stream)) {
|
||||||
// Revert backwards and overwrite if a save failed.
|
// Revert backwards and overwrite if a save failed.
|
||||||
stream->set_offset(prev_offset);
|
stream->set_offset(prev_offset);
|
||||||
num_objects--;
|
num_objects--;
|
||||||
|
|
|
@ -226,7 +226,7 @@ void ObjectTable::PurgeAllObjects() {
|
||||||
auto lock = global_critical_region_.Acquire();
|
auto lock = global_critical_region_.Acquire();
|
||||||
for (uint32_t slot = 0; slot < table_capacity_; slot++) {
|
for (uint32_t slot = 0; slot < table_capacity_; slot++) {
|
||||||
auto& entry = table_[slot];
|
auto& entry = table_[slot];
|
||||||
if (entry.object && !entry.object->host_object()) {
|
if (entry.object && !entry.object->is_host_object()) {
|
||||||
entry.handle_ref_count = 0;
|
entry.handle_ref_count = 0;
|
||||||
entry.object->Release();
|
entry.object->Release();
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ class XObject {
|
||||||
|
|
||||||
// Has this object been created for use by the host?
|
// Has this object been created for use by the host?
|
||||||
// Host objects are persisted through reloads/etc.
|
// Host objects are persisted through reloads/etc.
|
||||||
bool host_object() const { return host_object_; }
|
bool is_host_object() const { return host_object_; }
|
||||||
void set_host_object(bool host_object) { host_object_ = host_object; }
|
void set_host_object(bool host_object) { host_object_ = host_object; }
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|
Loading…
Reference in New Issue