about summary refs log tree commit diff
path: root/third_party/nix/src/libutil/json.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libutil/json.cc')
-rw-r--r--third_party/nix/src/libutil/json.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/third_party/nix/src/libutil/json.cc b/third_party/nix/src/libutil/json.cc
index da636e7be9c3..59ff74f5796f 100644
--- a/third_party/nix/src/libutil/json.cc
+++ b/third_party/nix/src/libutil/json.cc
@@ -18,7 +18,7 @@ void toJSON(std::ostream& str, const char* start, const char* end) {
       str << "\\t";
     } else if (*i >= 0 && *i < 32) {
       str << "\\u" << std::setfill('0') << std::setw(4) << std::hex
-          << (uint16_t)*i << std::dec;
+          << static_cast<uint16_t>(*i) << std::dec;
     } else {
       str << *i;
     }