]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Make AtomicFile::Type values lower case
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 24 Sep 2019 19:50:27 +0000 (21:50 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 5 Oct 2019 21:16:46 +0000 (23:16 +0200)
src/AtomicFile.cpp
src/AtomicFile.hpp
src/Config.cpp

index c73d39a3b91435d88ee495319ae5c1fdcfcbbc74..401968267f14dd59569dec922231b5de68f95804 100644 (file)
@@ -29,7 +29,7 @@
 AtomicFile::AtomicFile(const std::string& path, Mode mode) : m_path(path)
 {
   auto fd_and_path = util::create_temp_fd(path);
-  m_stream = fdopen(fd_and_path.first, mode == Mode::Binary ? "w+b" : "w+");
+  m_stream = fdopen(fd_and_path.first, mode == Mode::binary ? "w+b" : "w+");
   m_tmp_path = std::move(fd_and_path.second);
 }
 
index ed2e6c8d1c385a41c5dfb26738a25a77f843934c..23e9c4e67643071be78a363a1feeba012d42e366 100644 (file)
@@ -29,7 +29,7 @@
 class AtomicFile
 {
 public:
-  enum class Mode { Binary, Text };
+  enum class Mode { binary, text };
 
   AtomicFile(const std::string& destination_path, Mode mode);
   ~AtomicFile();
index ee875b170ca09498a2994797c82d155c09684c10..3a6d019a88b6203452d0a162d38a6a500b2a0030 100644 (file)
@@ -601,7 +601,7 @@ Config::set_value_in_file(const std::string& path,
   Config dummy_config;
   dummy_config.set_item(key, value, false, false, "");
 
-  AtomicFile output(path, AtomicFile::Mode::Text);
+  AtomicFile output(path, AtomicFile::Mode::text);
   bool found = false;
 
   if (!parse_config_file(path,