From 0e748d6274eecb20762f35c0430652f0b415f5e8 Mon Sep 17 00:00:00 2001 From: WrinklyNinja Date: Sun, 20 Oct 2013 11:33:32 +0100 Subject: [PATCH] Fixed some compiler warnings. --- src/backend/generators.h | 30 +++++++++++++++++++++++------- src/backend/helpers.cpp | 2 +- src/backend/legacy-parser.h | 2 +- src/gui/main.cpp | 2 +- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/backend/generators.h b/src/backend/generators.h index 88ab85d4..e4d518ee 100644 --- a/src/backend/generators.h +++ b/src/backend/generators.h @@ -677,7 +677,9 @@ namespace YAML { for (typename std::set::const_iterator it=rhs.begin(), endIt=rhs.end(); it != endIt; ++it) { out << *it; } - out << EndSeq; + out << EndSeq; + + return out; } inline Emitter& operator << (Emitter& out, const boss::PluginDirtyInfo& rhs) { @@ -692,7 +694,9 @@ namespace YAML { if (rhs.DeletedNavmeshes() > 0) out << Key << "nav" << Value << rhs.DeletedNavmeshes(); - out << EndMap; + out << EndMap; + + return out; } inline Emitter& operator << (Emitter& out, const boss::Game& rhs) { @@ -713,7 +717,9 @@ namespace YAML { else if (rhs.Id() == boss::g_game_fonv) out << Key << Value << boss::Game(boss::g_game_fonv).FolderName(); - out << EndMap; + out << EndMap; + + return out; } inline Emitter& operator << (Emitter& out, const boss::MessageContent& rhs) { @@ -723,7 +729,9 @@ namespace YAML { out << Key << "str" << Value << rhs.Str(); - out << EndMap; + out << EndMap; + + return out; } inline Emitter& operator << (Emitter& out, const boss::Message& rhs) { @@ -744,7 +752,9 @@ namespace YAML { if (!rhs.Condition().empty()) out << Key << "condition" << Value << rhs.Condition(); - out << EndMap; + out << EndMap; + + return out; } inline Emitter& operator << (Emitter& out, const boss::File& rhs) { @@ -762,6 +772,8 @@ namespace YAML { out << EndMap; } + + return out; } inline Emitter& operator << (Emitter& out, const boss::Tag& rhs) { @@ -779,7 +791,9 @@ namespace YAML { out << Key << "condition" << Value << rhs.Condition() << EndMap; - } + } + + return out; } inline Emitter& operator << (Emitter& out, const boss::Plugin& rhs) { @@ -813,7 +827,9 @@ namespace YAML { out << Key << "dirty" << Value << rhs.DirtyInfo(); out << EndMap; - } + } + + return out; } } diff --git a/src/backend/helpers.cpp b/src/backend/helpers.cpp index 7da4b30d..06ae475c 100644 --- a/src/backend/helpers.cpp +++ b/src/backend/helpers.cpp @@ -211,7 +211,7 @@ namespace boss { boost::filesystem::path GetLocalAppDataPath() { #if _WIN32 || _WIN64 - HWND owner; + HWND owner = 0; TCHAR path[MAX_PATH]; BOOST_LOG_TRIVIAL(trace) << "Getting path to %LOCALAPPDATA%."; diff --git a/src/backend/legacy-parser.h b/src/backend/legacy-parser.h index e3c8845a..6f484b3b 100644 --- a/src/backend/legacy-parser.h +++ b/src/backend/legacy-parser.h @@ -416,7 +416,7 @@ namespace boss { which is supported by the v3 syntax. */ int bracketNo = 0; - size_t pos; + size_t pos = 0; while ((pos = condition.find(" and ", pos)) != std::string::npos) { diff --git a/src/gui/main.cpp b/src/gui/main.cpp index 203ce3ab..50bb5080 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -61,7 +61,7 @@ #define BOOST_THREAD_VERSION 4 -IMPLEMENT_APP(BossGUI); +wxIMPLEMENT_APP(BossGUI); using namespace boss; using namespace std;