diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2011-03-17 00:42:38 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2011-03-17 00:57:16 +0100 |
commit | 9344a79233882ac278b3812b91b6edf874ef5d16 (patch) | |
tree | e5bd324104a9d8dcf1839de8a880845f8739a37a /src/account-server/main-account.cpp | |
parent | 0e24b15a386d45f43cea76c1b8ad744728a3190e (diff) | |
download | manaserv-9344a79233882ac278b3812b91b6edf874ef5d16.tar.gz manaserv-9344a79233882ac278b3812b91b6edf874ef5d16.tar.xz manaserv-9344a79233882ac278b3812b91b6edf874ef5d16.zip |
Micro-optimizations related to std::string
* Rely on the fact that a std::string is empty by default
* Use std::string::empty() rather than comparing to ""
* Construct with std::string() rather than from ""
Reviewed-by: Bertram
Diffstat (limited to 'src/account-server/main-account.cpp')
-rw-r--r-- | src/account-server/main-account.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/account-server/main-account.cpp b/src/account-server/main-account.cpp index 7c49350..9447cb0 100644 --- a/src/account-server/main-account.cpp +++ b/src/account-server/main-account.cpp @@ -116,7 +116,7 @@ static void initializeConfiguration(std::string configPath = std::string()) LOG_INFO("Using config file: " << configPath); // Check inter-server password. - if (Configuration::getValue("net_password", "") == "") + if (Configuration::getValue("net_password", std::string()).empty()) { LOG_FATAL("SECURITY WARNING: 'net_password' not set!"); exit(EXIT_BAD_CONFIG_PARAMETER); |