Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
orontee committed Nov 26, 2023
1 parent 487dd38 commit 638f349
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/version.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ const std::string news_file_base_url{"https://github.com/orontee/taranis/raw"};
VersionChecker::VersionChecker(std::shared_ptr<Config> config,
std::shared_ptr<HttpClient> client,
std::shared_ptr<Model> model)
: current_version_extended{version}, config{config}, client{client}, model{model} {}
: current_version_extended{version}, config{config}, client{client},
model{model} {}

void VersionChecker::check(CallContext context) {
BOOST_LOG_TRIVIAL(debug) << "Checking application version";
Expand Down Expand Up @@ -165,8 +166,8 @@ VersionChecker::extract_newer_releases(const Json::Value &value) const {

Version parsed_current_version;
try {
parsed_current_version =
this->parse_possible_version_string(this->shorten_current_version_extended());
parsed_current_version = this->parse_possible_version_string(
this->shorten_current_version_extended());
} catch (const std::runtime_error &error) {
BOOST_LOG_TRIVIAL(error)
<< "Failed to parse current version string!" << error.what();
Expand Down Expand Up @@ -275,12 +276,12 @@ VersionChecker::parse_possible_version_string(const std::string &target) {
return {major, minor, patch, match[4]};
}

std::string VersionChecker::shorten_current_version_extended() const {
std::stringstream to_parse{this->current_version_extended};
std::string token;
std::getline(to_parse, token, ' ');
return token;
}
std::string VersionChecker::shorten_current_version_extended() const {
std::stringstream to_parse{this->current_version_extended};
std::string token;
std::getline(to_parse, token, ' ');
return token;
}

std::string VersionChecker::generate_new_version_question(
const ReleaseDescription &release) const {
Expand Down

0 comments on commit 638f349

Please sign in to comment.