From 140247f4cb0a37ba84fe3087fb4db636d77e0fe8 Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Fri, 17 Apr 2020 11:13:40 +0200 Subject: [PATCH] Make stuff more constant --- core-buffer/include/BinaryWriter.hpp | 3 ++- core-buffer/src/BinaryWriter.cpp | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core-buffer/include/BinaryWriter.hpp b/core-buffer/include/BinaryWriter.hpp index b2aec14..16c8411 100644 --- a/core-buffer/include/BinaryWriter.hpp +++ b/core-buffer/include/BinaryWriter.hpp @@ -8,10 +8,11 @@ class BinaryWriter { const std::string device_name_; const std::string root_folder_; + const std::string latest_filename_; std::string current_output_filename_; int output_file_fd_; - std::string latest_filename_; + public: BinaryWriter( diff --git a/core-buffer/src/BinaryWriter.cpp b/core-buffer/src/BinaryWriter.cpp index 96ec210..3998e18 100644 --- a/core-buffer/src/BinaryWriter.cpp +++ b/core-buffer/src/BinaryWriter.cpp @@ -15,11 +15,10 @@ BinaryWriter::BinaryWriter( const string& root_folder) : device_name_(device_name), root_folder_(root_folder), + latest_filename_(root_folder + "/" + device_name + "/LATEST"), current_output_filename_(""), output_file_fd_(-1) { - latest_filename_ = root_folder + "/" + device_name + "/LATEST"; - #ifdef DEBUG_OUTPUT using namespace date; using namespace chrono;