Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kmaragon committed Nov 20, 2018
1 parent 8d325f4 commit bf40489
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class CxxmetricsConan(ConanFile):
name = "cxxmetrics"
version = "0.0.3"
version = "0.0.4"
license = "Apache 2.0"
settings = "os"
url = "https://github.com/kmaragon/cxxmetrics"
Expand Down
5 changes: 4 additions & 1 deletion cxxmetrics/ringbuf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,15 @@ ringbuf<TElemType, TSize>::iterator::iterator(const ringbuf *rb, int64_t offset)
}

current_ = rb->data_[at];
if (rb->head_.load(std::memory_order_release) == head)
auto nhead = rb->head_.load(std::memory_order_release);
if (nhead == head)
{
offset_ = at;
headat_ = head;
break;
}

head = nhead;
}

}
Expand Down
2 changes: 1 addition & 1 deletion cxxmetrics/simple_reservoir.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef CXXMETRICS_SIMPLE_RESERVOIR_HPP
#define CXXMETRICS_XIMPLE_RESERVOIR_HPP
#define CXXMETRICS_SIMPLE_RESERVOIR_HPP

#include "ringbuf.hpp"
#include "snapshots.hpp"
Expand Down

0 comments on commit bf40489

Please sign in to comment.