diff --git a/src/cli/parse_options.cpp b/src/cli/parse_options.cpp index dae2c5c..2a6690d 100644 --- a/src/cli/parse_options.cpp +++ b/src/cli/parse_options.cpp @@ -237,7 +237,7 @@ void App::print_help(const string &option) void App::print_version() { - cout << "remwharead " << global::version << endl << + cout << "remwharead " << remwharead::version << endl << "Copyright (C) 2019 tastytea \n" "License GPLv3: GNU GPL version 3 " ".\n" diff --git a/src/lib/export/adoc.cpp b/src/lib/export/adoc.cpp index 25d255c..9f7d49b 100644 --- a/src/lib/export/adoc.cpp +++ b/src/lib/export/adoc.cpp @@ -36,7 +36,7 @@ void Export::AsciiDoc::print() const try { _out << "= Visited things\n" - << ":Author: remwharead " << global::version << "\n" + << ":Author: remwharead " << version << "\n" << ":Date: " << timepoint_to_string(system_clock::now()) << "\n" << ":TOC: right\n" diff --git a/src/lib/export/rss.cpp b/src/lib/export/rss.cpp index 903fa59..6adda04 100644 --- a/src/lib/export/rss.cpp +++ b/src/lib/export/rss.cpp @@ -66,7 +66,7 @@ void Export::RSS::print() const writer.endElement("", "", "description"); writer.startElement("", "", "generator"); - writer.characters(string("remwharead ") + global::version); + writer.characters(string("remwharead ") + version); writer.endElement("", "", "generator"); const string now = DateTimeFormatter::format(DateTime(), diff --git a/src/lib/uri.cpp b/src/lib/uri.cpp index b8d5c46..5a1e0c0 100644 --- a/src/lib/uri.cpp +++ b/src/lib/uri.cpp @@ -187,7 +187,7 @@ string URI::make_request(const string &uri, bool archive) const } HTTPRequest request(method, path, HTTPMessage::HTTP_1_1); - request.set("User-Agent", string("remwharead/") + global::version); + request.set("User-Agent", string("remwharead/") + version); HTTPResponse response; diff --git a/src/version.hpp.in b/src/version.hpp.in index d2a5c45..b4bec2d 100644 --- a/src/version.hpp.in +++ b/src/version.hpp.in @@ -1,9 +1,9 @@ #ifndef VERSION_HPP #define VERSION_HPP -namespace global +namespace remwharead { static constexpr char version[] = "@PROJECT_VERSION@"; -} +} // namespace remwharead #endif // VERSION_HPP