Skip to content

Commit

Permalink
removed an unnecessary cast (fixed #162)
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Dec 29, 2015
1 parent aca6a3b commit 3905406
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ I deeply appreciate the help of the following people.
- [Eric Cornelius](https://github.com/EricMCornelius) pointed out a bug in the handling with NaN and infinity values. He also improved the performance of the string escaping.
- [易思龙](https://github.com/likebeta) implemented a conversion from anonymous enums.
- [kepkin](https://github.com/kepkin) patiently pushed forward the support for Microsoft Visual studio.
- [gregmarr](https://github.com/gregmarr) simplified the implementation of reverse iterators.
- [gregmarr](https://github.com/gregmarr) simplified the implementation of reverse iterators and helped with numerous hints and improvements.
- [Caio Luppi](https://github.com/caiovlp) fixed a bug in the Unicode handling.
- [dariomt](https://github.com/dariomt) fixed some typos in the examples.
- [Daniel Frey](https://github.com/d-frey) cleaned up some pointers and implemented exception-safe memory allocation.
Expand Down
3 changes: 1 addition & 2 deletions src/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7866,8 +7866,7 @@ no parse error occurred.
*/
inline nlohmann::json operator "" _json(const char* s, std::size_t)
{
return nlohmann::json::parse(reinterpret_cast<nlohmann::json::string_t::value_type*>
(const_cast<char*>(s)));
return nlohmann::json::parse(reinterpret_cast<const nlohmann::json::string_t::value_type*>(s));
}

#endif
3 changes: 1 addition & 2 deletions src/json.hpp.re2c
Original file line number Diff line number Diff line change
Expand Up @@ -7145,8 +7145,7 @@ no parse error occurred.
*/
inline nlohmann::json operator "" _json(const char* s, std::size_t)
{
return nlohmann::json::parse(reinterpret_cast<nlohmann::json::string_t::value_type*>
(const_cast<char*>(s)));
return nlohmann::json::parse(reinterpret_cast<const nlohmann::json::string_t::value_type*>(s));
}

#endif

0 comments on commit 3905406

Please sign in to comment.