forked from OctaForge/libostd
rename disown to release (consistent with other places)
This commit is contained in:
parent
9251fb506f
commit
9e609e0057
|
@ -455,7 +455,7 @@ public:
|
||||||
p_len = v.p_len;
|
p_len = v.p_len;
|
||||||
p_cap = v.p_cap;
|
p_cap = v.p_cap;
|
||||||
p_buf.~StrPair();
|
p_buf.~StrPair();
|
||||||
new (&p_buf) StrPair(v.disown(), move(v.p_buf.second()));
|
new (&p_buf) StrPair(v.release(), move(v.p_buf.second()));
|
||||||
if (!p_cap) {
|
if (!p_cap) {
|
||||||
p_buf.first() = reinterpret_cast<Pointer>(&p_len);
|
p_buf.first() = reinterpret_cast<Pointer>(&p_len);
|
||||||
}
|
}
|
||||||
|
@ -559,7 +559,7 @@ public:
|
||||||
|
|
||||||
bool empty() const { return (size() == 0); }
|
bool empty() const { return (size() == 0); }
|
||||||
|
|
||||||
Value *disown() {
|
Value *release() {
|
||||||
Pointer r = p_buf.first();
|
Pointer r = p_buf.first();
|
||||||
p_buf.first() = nullptr;
|
p_buf.first() = nullptr;
|
||||||
p_len = p_cap = 0;
|
p_len = p_cap = 0;
|
||||||
|
|
|
@ -218,7 +218,7 @@ public:
|
||||||
p_len = v.p_len;
|
p_len = v.p_len;
|
||||||
p_cap = v.p_cap;
|
p_cap = v.p_cap;
|
||||||
p_buf.~VecPair();
|
p_buf.~VecPair();
|
||||||
new (&p_buf) VecPair(v.disown(), move(v.p_buf.second()));
|
new (&p_buf) VecPair(v.release(), move(v.p_buf.second()));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -398,7 +398,7 @@ public:
|
||||||
return ptr >= p_buf.first() && ptr < &p_buf.first()[p_len];
|
return ptr >= p_buf.first() && ptr < &p_buf.first()[p_len];
|
||||||
}
|
}
|
||||||
|
|
||||||
Value *disown() {
|
Value *release() {
|
||||||
Pointer r = p_buf.first();
|
Pointer r = p_buf.first();
|
||||||
p_buf.first() = nullptr;
|
p_buf.first() = nullptr;
|
||||||
p_len = p_cap = 0;
|
p_len = p_cap = 0;
|
||||||
|
|
Loading…
Reference in a new issue