mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-09-27 18:30:08 +00:00
Fix a few compiler warnings and formatting for DB startup message (#272)
Note that the warning in TableData.cpp only seems to occur on clang (deprecated-declarations) Database account/player count message: Before: [INFO] Database in operation : Found 1 account(s) and 2 player(s)s After: [INFO] Database in operation: Found 1 account and 2 players
This commit is contained in:
@@ -267,17 +267,17 @@ void Database::open() {
|
||||
checkMetaTable();
|
||||
createTables();
|
||||
|
||||
std::cout << "[INFO] Database in operation ";
|
||||
std::cout << "[INFO] Database in operation";
|
||||
int accounts = getTableSize("Accounts");
|
||||
int players = getTableSize("Players");
|
||||
std::string message = "";
|
||||
if (accounts > 0) {
|
||||
message += ": Found " + std::to_string(accounts) + " account(s)";
|
||||
message += ": Found " + std::to_string(accounts) + " account";
|
||||
if (accounts > 1)
|
||||
message += "s";
|
||||
}
|
||||
if (players > 0) {
|
||||
message += " and " + std::to_string(players) + " player(s)";
|
||||
message += " and " + std::to_string(players) + " player";
|
||||
if (players > 1)
|
||||
message += "s";
|
||||
}
|
||||
|
Reference in New Issue
Block a user