3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 11:55:51 +00:00

replace remaining volatiles with atomic<>

volatiles are now deprecated in recent C++
This commit is contained in:
Nuno Lopes 2020-10-24 11:47:45 +01:00
parent a4aa87b6c9
commit 0213af3c61
7 changed files with 19 additions and 11 deletions

View file

@ -133,8 +133,13 @@ public:
}
vector(SZ s) {
m_data = nullptr;
init(s);
}
void init(SZ s) {
SASSERT(m_data == nullptr;);
if (s == 0) {
m_data = nullptr;
return;
}
SZ * mem = reinterpret_cast<SZ*>(memory::allocate(sizeof(T) * s + sizeof(SZ) * 2));