From 35afb2800e5d99dcec568dc1c5b243b9666d4e9d Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 28 Dec 2019 05:53:49 +0100 Subject: [PATCH] Change ProfileData::max_size to size_t. --- src/config.cpp | 5 ++--- src/config.hpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/config.cpp b/src/config.cpp index 664cce8..22d87a9 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -180,7 +180,7 @@ void Config::generate() { line = "500"; } - data.max_size = static_cast(stoul(line)); + data.max_size = stoul(line); BOOST_LOG_TRIVIAL(debug) << "Generated configuration."; write(); @@ -240,8 +240,7 @@ void Config::parse() data.last_guid = _json[_profile]["last_guid"].asString(); if (!_json[_profile]["max_size"].isNull()) { - data.max_size = - static_cast(_json[_profile]["max_size"].asUInt64()); + data.max_size = _json[_profile]["max_size"].asUInt64(); } for (const auto &skip : _json[_profile]["skip"]) { diff --git a/src/config.hpp b/src/config.hpp index d7ed3f2..58fd99d 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -47,7 +47,7 @@ struct ProfileData string instance; uint32_t interval{30}; string last_guid; - uint32_t max_size{500}; + size_t max_size{500}; vector skip; bool titles_as_cw{false}; bool titles_only{false};