Skip to content

Commit b663bb0

Browse files
lingvo-botcopybara-github
authored andcommitted
Use std::numeric_limits instead of kint64max.
Replaces the usage of the Google-specific `kint64max` constant with the standard C++ equivalent `std::numeric_limits<int64_t>::max()`. PiperOrigin-RevId: 833908503
1 parent 536e0e2 commit b663bb0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lingvo/core/ops/record_yielder.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ limitations under the License.
1616
#include "lingvo/core/ops/record_yielder.h"
1717

1818
#include <chrono> // NOLINT(build/c++11)
19+
#include <cstdint>
20+
#include <limits>
1921
#include <memory>
2022
#include <string>
2123
#include <thread> // NOLINT(build/c++11)
@@ -330,7 +332,7 @@ class IotaIterator : public RecordIterator {
330332
public:
331333
IotaIterator(const string& filename) {
332334
if (filename.empty() || !strings::safe_strto64(filename, &max_)) {
333-
max_ = kint64max;
335+
max_ = std::numeric_limits<int64_t>::max();
334336
}
335337
}
336338

@@ -344,7 +346,7 @@ class IotaIterator : public RecordIterator {
344346
}
345347

346348
private:
347-
int64_t max_ = kint64max;
349+
int64_t max_ = std::numeric_limits<int64_t>::max();
348350
int64_t num_ = 0;
349351
};
350352

0 commit comments

Comments
 (0)