File tree Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -106,9 +106,10 @@ namespace osmium {
106106 return 0 ; // stdin
107107 }
108108
109- int flags = O_RDONLY;
110109#ifdef _WIN32
111- flags |= O_BINARY;
110+ const int flags = O_RDONLY | O_BINARY;
111+ #else
112+ const int flags = O_RDONLY;
112113#endif
113114 const int fd = ::open (filename.c_str (), flags);
114115 if (fd < 0 ) {
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ namespace osmium {
149149
150150 void to_iso_str (std::string& s) const {
151151 std::tm tm; // NOLINT(cppcoreguidelines-pro-type-member-init,hicpp-member-init)
152- std::time_t sse = seconds_since_epoch ();
152+ const std::time_t sse = seconds_since_epoch ();
153153#ifndef NDEBUG
154154 auto result =
155155#endif
Original file line number Diff line number Diff line change @@ -79,10 +79,10 @@ namespace osmium {
7979
8080 Timer () = default ;
8181
82- void start () const noexcept { // NOLINT(readability-convert-member-functions-to-static)
82+ void start () noexcept { // NOLINT(readability-convert-member-functions-to-static)
8383 }
8484
85- void stop () const noexcept { // NOLINT(readability-convert-member-functions-to-static)
85+ void stop () noexcept { // NOLINT(readability-convert-member-functions-to-static)
8686 }
8787
8888 int64_t elapsed_microseconds () const noexcept { // NOLINT(readability-convert-member-functions-to-static)
Original file line number Diff line number Diff line change @@ -553,7 +553,7 @@ TEST_CASE("Reading OSM XML 200: Using Reader asking for ways") {
553553 const osmium::io::Header header{reader.header ()};
554554 REQUIRE (header.get (" generator" ) == " testdata" );
555555
556- osmium::memory::Buffer buffer = reader.read ();
556+ const osmium::memory::Buffer buffer = reader.read ();
557557 REQUIRE (0 == buffer.committed ());
558558 REQUIRE_FALSE (buffer);
559559 reader.close ();
You can’t perform that action at this time.
0 commit comments