Commit fdbf2f94 by Marcus Winter

containers_cpp: fixed codesonar warning

parent d405a2af
......@@ -136,8 +136,10 @@ allocate_rec(int node, Type& element) {
do {
current = tree_[node];
desired = current - 1;
if (desired < 0)
if (desired < 0) {
element = Type();
return -1;
}
} while (!tree_[node].CompareAndSwap(current, desired));
int leftResult = allocate_rec(GetLeftChildIndex(node), element);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment