From 1e08654f995ab9248ea3567dcb3854d2928198a2 Mon Sep 17 00:00:00 2001
From: Niels Lohmann <mail@nlohmann.me>
Date: Mon, 2 Apr 2018 22:25:17 +0200
Subject: [PATCH] :hammer: cleanup

---
 .travis.yml                                      | 1 +
 include/nlohmann/detail/input/input_adapters.hpp | 7 ++-----
 include/nlohmann/detail/input/json_sax.hpp       | 1 -
 single_include/nlohmann/json.hpp                 | 6 ++----
 4 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 8ce38cc8..68a16db5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -277,6 +277,7 @@ script:
      if [[ (-x $(which brew)) ]]; then
        brew update
        brew install cmake ninja
+       brew upgrade cmake
        cmake --version
      fi
 
diff --git a/include/nlohmann/detail/input/input_adapters.hpp b/include/nlohmann/detail/input/input_adapters.hpp
index 82a59136..4c942f33 100644
--- a/include/nlohmann/detail/input/input_adapters.hpp
+++ b/include/nlohmann/detail/input/input_adapters.hpp
@@ -1,11 +1,8 @@
 #pragma once
 
-#include <algorithm> // min
-#include <array> // array
 #include <cassert> // assert
 #include <cstddef> // size_t
 #include <cstring> // strlen
-#include <ios> // streamsize, streamoff, streampos
 #include <istream> // istream
 #include <iterator> // begin, end, iterator_traits, random_access_iterator_tag, distance, next
 #include <memory> // shared_ptr, make_shared, addressof
@@ -31,7 +28,7 @@ enum class input_format_t { json, cbor, msgpack, ubjson };
 @brief abstract input adapter interface
 
 Produces a stream of std::char_traits<char>::int_type characters from a
-std::istream, a buffer, or some other input type.  Accepts the return of
+std::istream, a buffer, or some other input type. Accepts the return of
 exactly one non-EOF character for future input. The int_type characters
 returned consist of all valid char values as positive values (typically
 unsigned char), plus an EOF value outside that range, specified by the value
@@ -115,7 +112,7 @@ class input_buffer_adapter : public input_adapter_protocol
     /// pointer to the current character
     const char* cursor;
     /// pointer past the last character
-    const char* limit;
+    const char* const limit;
 };
 
 class input_adapter
diff --git a/include/nlohmann/detail/input/json_sax.hpp b/include/nlohmann/detail/input/json_sax.hpp
index 0bc628cc..561bbe1c 100644
--- a/include/nlohmann/detail/input/json_sax.hpp
+++ b/include/nlohmann/detail/input/json_sax.hpp
@@ -660,4 +660,3 @@ class json_sax_acceptor : public json_sax<BasicJsonType>
 }
 
 }
-
diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp
index 30085744..637cb403 100644
--- a/single_include/nlohmann/json.hpp
+++ b/single_include/nlohmann/json.hpp
@@ -1572,12 +1572,10 @@ constexpr const auto& to_json = detail::static_const<detail::to_json_fn>::value;
 // #include <nlohmann/detail/input/input_adapters.hpp>
 
 
-#include <algorithm> // min
 #include <array> // array
 #include <cassert> // assert
 #include <cstddef> // size_t
 #include <cstring> // strlen
-#include <ios> // streamsize, streamoff, streampos
 #include <istream> // istream
 #include <iterator> // begin, end, iterator_traits, random_access_iterator_tag, distance, next
 #include <memory> // shared_ptr, make_shared, addressof
@@ -1686,9 +1684,9 @@ class input_buffer_adapter : public input_adapter_protocol
 
   private:
     /// pointer to the current character
-    const char* cursor;
+    const char* const cursor;
     /// pointer past the last character
-    const char* limit;
+    const char* const limit;
 };
 
 class input_adapter