mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-01-19 12:07:13 +01:00
Compare commits
No commits in common. "4cefc96fafa587ae4f80a3c3524bd24eac3b0c8b" and "cacc6c7c6280d6e992ec632b3a8f9a2527c8257e" have entirely different histories.
4cefc96faf
...
cacc6c7c62
@ -148,7 +148,6 @@ public:
|
|||||||
: m_Ptr(o.m_Ptr), m_Cap(o.m_Cap), m_Cur(o.m_Cur)
|
: m_Ptr(o.m_Ptr), m_Cap(o.m_Cap), m_Cur(o.m_Cur)
|
||||||
{
|
{
|
||||||
o.m_Ptr = nullptr;
|
o.m_Ptr = nullptr;
|
||||||
o.m_Cap = o.m_Cur = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
@ -176,7 +175,6 @@ public:
|
|||||||
m_Cap = o.m_Cap;
|
m_Cap = o.m_Cap;
|
||||||
m_Cur = o.m_Cur;
|
m_Cur = o.m_Cur;
|
||||||
o.m_Ptr = nullptr;
|
o.m_Ptr = nullptr;
|
||||||
o.m_Cap = o.m_Cur = 0;
|
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@ -858,17 +856,6 @@ public:
|
|||||||
m_Cur += Write(m_Cur, str, size);
|
m_Cur += Write(m_Cur, str, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------
|
|
||||||
* Steal ownership of the internal memory buffer. Whoever gets hold of the buffer must invoke delete [] on it.
|
|
||||||
*/
|
|
||||||
SQMOD_NODISCARD Pointer Steal()
|
|
||||||
{
|
|
||||||
Pointer ptr = m_Ptr;
|
|
||||||
m_Ptr = nullptr;
|
|
||||||
m_Cap = m_Cur = 0; // Save this before calling this method
|
|
||||||
return ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
|
@ -178,7 +178,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
Buffer & Valid() const
|
Buffer & Valid() const
|
||||||
{
|
{
|
||||||
Validate();
|
Valid();
|
||||||
// Return the buffer
|
// Return the buffer
|
||||||
return *m_Buffer;
|
return *m_Buffer;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user