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);
}
class AtomicFile
{
public:
- enum class Mode { Binary, Text };
+ enum class Mode { binary, text };
AtomicFile(const std::string& destination_path, Mode mode);
~AtomicFile();
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,