diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/notify.cpp | 2 | ||||
-rw-r--r-- | src/common/notify.h | 7 | ||||
-rw-r--r-- | src/common/updates.cpp | 2 | ||||
-rw-r--r-- | src/common/util.cpp | 2 |
4 files changed, 10 insertions, 3 deletions
diff --git a/src/common/notify.cpp b/src/common/notify.cpp index e2df5096d..f31100214 100644 --- a/src/common/notify.cpp +++ b/src/common/notify.cpp @@ -62,7 +62,7 @@ static void replace(std::vector<std::string> &v, const char *tag, const char *s) boost::replace_all(str, tag, s); } -int Notify::notify(const char *tag, const char *s, ...) +int Notify::notify(const char *tag, const char *s, ...) const { std::vector<std::string> margs = args; diff --git a/src/common/notify.h b/src/common/notify.h index f813e8def..65d4e1072 100644 --- a/src/common/notify.h +++ b/src/common/notify.h @@ -38,8 +38,12 @@ class Notify { public: Notify(const char *spec); + Notify(const Notify&) = default; + Notify(Notify&&) = default; + Notify& operator=(const Notify&) = default; + Notify& operator=(Notify&&) = default; - int notify(const char *tag, const char *s, ...); + int notify(const char *tag, const char *s, ...) const; private: std::string filename; @@ -47,3 +51,4 @@ private: }; } + diff --git a/src/common/updates.cpp b/src/common/updates.cpp index c51c4320f..61a76f5da 100644 --- a/src/common/updates.cpp +++ b/src/common/updates.cpp @@ -102,6 +102,8 @@ namespace tools const char *base = user ? "https://downloads.getmonero.org/" : "https://updates.getmonero.org/"; #ifdef _WIN32 static const char *extension = strncmp(buildtag.c_str(), "source", 6) ? (strncmp(buildtag.c_str(), "install-", 8) ? ".zip" : ".exe") : ".tar.bz2"; +#elif defined(__APPLE__) + static const char *extension = strncmp(software.c_str(), "monero-gui", 10) ? ".tar.bz2" : ".dmg"; #else static const char extension[] = ".tar.bz2"; #endif diff --git a/src/common/util.cpp b/src/common/util.cpp index 138ac4294..433cb4919 100644 --- a/src/common/util.cpp +++ b/src/common/util.cpp @@ -1116,7 +1116,7 @@ std::string get_nix_version_display_string() static constexpr const byte_map sizes[] = { {"%.0f B", 1024}, - {"%.2f KB", 1024 * 1024}, + {"%.2f kB", 1024 * 1024}, {"%.2f MB", std::uint64_t(1024) * 1024 * 1024}, {"%.2f GB", std::uint64_t(1024) * 1024 * 1024 * 1024}, {"%.2f TB", std::uint64_t(1024) * 1024 * 1024 * 1024 * 1024} |