From cc4d79495f98006f77c68792b946a412f5e86714 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 22 Mar 2015 13:47:55 +0100 Subject: Core/Misc: Warning fixes --- src/server/shared/Updater/UpdateFetcher.h | 19 ++++++++++++------- src/server/shared/Utilities/ServiceWin32.cpp | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) (limited to 'src/server/shared') diff --git a/src/server/shared/Updater/UpdateFetcher.h b/src/server/shared/Updater/UpdateFetcher.h index f545c232a94..48a94444aa6 100644 --- a/src/server/shared/Updater/UpdateFetcher.h +++ b/src/server/shared/Updater/UpdateFetcher.h @@ -27,7 +27,7 @@ class UpdateFetcher { - using Path = boost::filesystem::path; + typedef boost::filesystem::path Path; public: UpdateFetcher(Path const& updateDirectory, @@ -53,6 +53,9 @@ private: struct AppliedFileEntry { + AppliedFileEntry(std::string const& name_, std::string const& hash_, State state_, uint64 timestamp_) + : name(name_), hash(hash_), state(state_), timestamp(timestamp_) { } + std::string const name; std::string const hash; @@ -79,12 +82,14 @@ private: struct DirectoryEntry { + DirectoryEntry(Path const& path_, State state_) : path(path_), state(state_) { } + Path const path; State const state; }; - using LocaleFileEntry = std::pair; + typedef std::pair LocaleFileEntry; struct PathCompare { @@ -94,11 +99,11 @@ private: } }; - using LocaleFileStorage = std::set; - using HashToFileNameStorage = std::unordered_map; - using AppliedFileStorage = std::unordered_map; - using DirectoryStorage = std::vector; - using SQLUpdate = std::shared_ptr; + typedef std::set LocaleFileStorage; + typedef std::unordered_map HashToFileNameStorage; + typedef std::unordered_map AppliedFileStorage; + typedef std::vector DirectoryStorage; + typedef std::shared_ptr SQLUpdate; LocaleFileStorage GetFileList() const; void FillFileListRecursively(Path const& path, LocaleFileStorage& storage, State const state, uint32 const depth) const; diff --git a/src/server/shared/Utilities/ServiceWin32.cpp b/src/server/shared/Utilities/ServiceWin32.cpp index c73949fc6a3..3e5e416b1a3 100644 --- a/src/server/shared/Utilities/ServiceWin32.cpp +++ b/src/server/shared/Utilities/ServiceWin32.cpp @@ -255,7 +255,7 @@ bool WinServiceRun() if (!StartServiceCtrlDispatcher(serviceTable)) { - TC_LOG_ERROR("server.worldserver", "StartService Failed. Error [%u]", ::GetLastError()); + TC_LOG_ERROR("server.worldserver", "StartService Failed. Error [%u]", uint32(::GetLastError())); return false; } return true; -- cgit v1.2.3