Commit 5f59e812 by Marcus Winter

dataflow_cpp: fixed codesonar warning

parent fdbf2f94
...@@ -123,8 +123,10 @@ bool LockFreeStack< Type, ValuePool >::TryPop(Type & element) { ...@@ -123,8 +123,10 @@ bool LockFreeStack< Type, ValuePool >::TryPop(Type & element) {
top_cached = top; top_cached = top;
// Stack empty, cannot pop // Stack empty, cannot pop
if (top_cached == NULL) if (top_cached == NULL) {
element = Type();
return false; return false;
}
// Guard top_cached // Guard top_cached
hazardPointer.Guard(0, top_cached); hazardPointer.Guard(0, top_cached);
......
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