aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/shared/Updater/UpdateFetcher.h25
-rw-r--r--src/server/shared/Utilities/ServiceWin32.cpp2
-rw-r--r--src/server/worldserver/Main.cpp2
3 files changed, 14 insertions, 15 deletions
diff --git a/src/server/shared/Updater/UpdateFetcher.h b/src/server/shared/Updater/UpdateFetcher.h
index 95988224ee2..fa142547873 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;
@@ -61,9 +64,6 @@ private:
uint64 const timestamp;
- AppliedFileEntry(std::string const& _name, std::string const& _hash, State const _state, uint64 const _timestamp) :
- name(_name), hash(_hash), state(_state), timestamp(_timestamp) { }
-
static inline State StateConvert(std::string const& state)
{
return (state == "RELEASED") ? RELEASED : ARCHIVED;
@@ -82,15 +82,14 @@ private:
struct DirectoryEntry
{
+ DirectoryEntry(Path const& path_, State state_) : path(path_), state(state_) { }
+
Path const path;
State const state;
-
- DirectoryEntry(Path const& _path, State const _state) :
- path(_path), state(_state) { }
};
- using LocaleFileEntry = std::pair<Path, State>;
+ typedef std::pair<Path, State> LocaleFileEntry;
struct PathCompare
{
@@ -100,11 +99,11 @@ private:
}
};
- using LocaleFileStorage = std::set<LocaleFileEntry, PathCompare>;
- using HashToFileNameStorage = std::unordered_map<std::string, std::string>;
- using AppliedFileStorage = std::unordered_map<std::string, AppliedFileEntry>;
- using DirectoryStorage = std::vector<UpdateFetcher::DirectoryEntry>;
- using SQLUpdate = std::shared_ptr<std::string>;
+ typedef std::set<LocaleFileEntry, PathCompare> LocaleFileStorage;
+ typedef std::unordered_map<std::string, std::string> HashToFileNameStorage;
+ typedef std::unordered_map<std::string, AppliedFileEntry> AppliedFileStorage;
+ typedef std::vector<UpdateFetcher::DirectoryEntry> DirectoryStorage;
+ typedef std::shared_ptr<std::string> 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;
diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp
index fbf2c74ac0b..430c3ce4d73 100644
--- a/src/server/worldserver/Main.cpp
+++ b/src/server/worldserver/Main.cpp
@@ -308,7 +308,7 @@ void ShutdownCLIThread(std::thread* cliThread)
errorBuffer = "Unknown error";
TC_LOG_DEBUG("server.worldserver", "Error cancelling I/O of CliThread, error code %u, detail: %s",
- errorCode, errorBuffer);
+ uint32(errorCode), errorBuffer);
LocalFree(errorBuffer);
// send keyboard input to safely unblock the CLI thread