in resolution of [Wsign-compare] warning id 3 #c2
This commit is contained in:
parent
88b2336369
commit
e3e3b79cc8
@ -365,8 +365,8 @@ bool LogEveryNState::ShouldLog(int n) {
|
||||
}
|
||||
|
||||
bool LogFirstNState::ShouldLog(int n) {
|
||||
const uint32 counter_value = counter_.load(std::memory_order_relaxed);
|
||||
if (counter_value < (size_t)n) {
|
||||
const int counter_value = static_cast<int>( counter_.load(std::memory_order_relaxed) );
|
||||
if (counter_value < n) {
|
||||
counter_.store(counter_value + 1, std::memory_order_relaxed);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user