From 0ea5690a75388e1dcde8bb5308e70be8afc6f08a Mon Sep 17 00:00:00 2001 From: vill Date: Wed, 29 Apr 2020 10:52:41 +0800 Subject: [PATCH] some var const. --- DataLoader/DataLoader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DataLoader/DataLoader.cpp b/DataLoader/DataLoader.cpp index 71a39ca..253b648 100644 --- a/DataLoader/DataLoader.cpp +++ b/DataLoader/DataLoader.cpp @@ -16,7 +16,7 @@ bool DataLoader::loadMap(std::unordered_map& map, const s std::string line; std::getline(in, line); while (!line.empty()) { - auto j = line.find(DataLoader::DELIMITER); + const auto j = line.find(DataLoader::DELIMITER); if (j == std::string::npos) { continue; } else { @@ -39,7 +39,7 @@ void DataLoader::clear() { int DataLoader::readFromFile(const std::string& filename) { std::ifstream in(filename); if (in.is_open()) { - int before = this->transactions.size(); + const auto before = this->transactions.size(); std::string line; std::getline(in, line); while (!line.empty()) {