From f7b5aa33ce2672f220ef285b42eaedfa077a71a7 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 18 Sep 2015 13:04:09 +0200 Subject: [PATCH] Fix a couple of wrong white spaces --- icinga-studio/api.cpp | 2 +- lib/base/configobject.cpp | 26 +++++++++++++------------- lib/cli/objectlistcommand.cpp | 2 +- lib/cli/objectlistutility.cpp | 2 +- lib/remote/httpresponse.cpp | 2 +- plugins/check_load.cpp | 2 +- plugins/check_memory.cpp | 2 +- plugins/check_perfmon.cpp | 2 +- plugins/check_ping.cpp | 2 +- plugins/check_swap.cpp | 2 +- plugins/check_update.cpp | 2 +- plugins/check_uptime.cpp | 2 +- plugins/check_users.cpp | 2 +- plugins/thresholds.cpp | 2 +- 14 files changed, 26 insertions(+), 26 deletions(-) diff --git a/icinga-studio/api.cpp b/icinga-studio/api.cpp index ac9073dd1..7a1bc31a9 100644 --- a/icinga-studio/api.cpp +++ b/icinga-studio/api.cpp @@ -162,4 +162,4 @@ void ApiClient::ObjectsHttpCompletionCallback(HttpRequest& request, } callback(objects); -} \ No newline at end of file +} diff --git a/lib/base/configobject.cpp b/lib/base/configobject.cpp index 58e279eaa..6d3dff544 100644 --- a/lib/base/configobject.cpp +++ b/lib/base/configobject.cpp @@ -121,15 +121,15 @@ void ConfigObject::ModifyAttribute(const String& attr, const Value& value, bool bool updated_original_attributes = false; Type::Ptr type = GetReflectionType(); - + std::vector tokens; boost::algorithm::split(tokens, attr, boost::is_any_of(".")); - + String fieldName = tokens[0]; - + int fid = type->GetFieldId(fieldName); Field field = type->GetFieldInfo(fid); - + Value oldValue = GetField(fid); if (field.Attributes & FAConfig) { @@ -143,25 +143,25 @@ void ConfigObject::ModifyAttribute(const String& attr, const Value& value, bool original_attributes->Set(attr, oldValue); } } - + Value newValue; - + if (tokens.size() > 1) { newValue = oldValue.Clone(); Value current = newValue; - + if (current.IsEmpty()) { current = new Dictionary(); newValue = current; } - + for (std::vector::size_type i = 1; i < tokens.size() - 1; i++) { if (!current.IsObjectType()) BOOST_THROW_EXCEPTION(std::invalid_argument("Value must be a dictionary.")); Dictionary::Ptr dict = current; const String& key = tokens[i]; - + if (!dict->Contains(key)) { current = new Dictionary(); dict->Set(key, current); @@ -169,13 +169,13 @@ void ConfigObject::ModifyAttribute(const String& attr, const Value& value, bool current = dict->Get(key); } } - + if (!current.IsObjectType()) BOOST_THROW_EXCEPTION(std::invalid_argument("Value must be a dictionary.")); - + Dictionary::Ptr dict = current; const String& key = tokens[tokens.size() - 1]; - + dict->Set(key, value); } else newValue = value; @@ -259,7 +259,7 @@ void ConfigObject::Activate(void) } SetAuthority(true); - + NotifyActive(); } diff --git a/lib/cli/objectlistcommand.cpp b/lib/cli/objectlistcommand.cpp index 0856362cb..0ad2ddc38 100644 --- a/lib/cli/objectlistcommand.cpp +++ b/lib/cli/objectlistcommand.cpp @@ -137,4 +137,4 @@ void ObjectListCommand::PrintTypeCounts(std::ostream& fp, const std::mapRead(data, count, true); -} \ No newline at end of file +} diff --git a/plugins/check_load.cpp b/plugins/check_load.cpp index f741cd24e..3c6ba3983 100644 --- a/plugins/check_load.cpp +++ b/plugins/check_load.cpp @@ -250,4 +250,4 @@ die: if (phQuery) PdhCloseQuery(phQuery); return 3; -} \ No newline at end of file +} diff --git a/plugins/check_memory.cpp b/plugins/check_memory.cpp index ef8c10eec..229361052 100644 --- a/plugins/check_memory.cpp +++ b/plugins/check_memory.cpp @@ -213,4 +213,4 @@ INT check_memory(printInfoStruct& printInfo) delete pMemBuf; return -1; -} \ No newline at end of file +} diff --git a/plugins/check_perfmon.cpp b/plugins/check_perfmon.cpp index a068b117f..02b118620 100644 --- a/plugins/check_perfmon.cpp +++ b/plugins/check_perfmon.cpp @@ -400,4 +400,4 @@ VOID FormatPDHError(PDH_STATUS status) std::wcout << pMessage << '\n'; LocalFree(pMessage); -} \ No newline at end of file +} diff --git a/plugins/check_ping.cpp b/plugins/check_ping.cpp index cde32f25b..d93ed9666 100644 --- a/plugins/check_ping.cpp +++ b/plugins/check_ping.cpp @@ -444,4 +444,4 @@ die: delete reinterpret_cast(repBuf); return 3; -} \ No newline at end of file +} diff --git a/plugins/check_swap.cpp b/plugins/check_swap.cpp index fde4e1752..320cc8fdf 100644 --- a/plugins/check_swap.cpp +++ b/plugins/check_swap.cpp @@ -206,4 +206,4 @@ INT check_swap(printInfoStruct& printInfo) printInfo.aSwap = round(MemBuf.ullAvailPageFile / pow(1024.0, printInfo.unit)); return -1; -} \ No newline at end of file +} diff --git a/plugins/check_update.cpp b/plugins/check_update.cpp index d17406559..16aa67925 100644 --- a/plugins/check_update.cpp +++ b/plugins/check_update.cpp @@ -249,4 +249,4 @@ die: if (criteria) SysFreeString(criteria); return 3; -} \ No newline at end of file +} diff --git a/plugins/check_uptime.cpp b/plugins/check_uptime.cpp index 96a25fe5c..d26977269 100644 --- a/plugins/check_uptime.cpp +++ b/plugins/check_uptime.cpp @@ -216,4 +216,4 @@ VOID getUptime(printInfoStruct& printInfo) printInfo.time = uptime.count(); break; } -} \ No newline at end of file +} diff --git a/plugins/check_users.cpp b/plugins/check_users.cpp index e5bdd69d3..ed161ed44 100644 --- a/plugins/check_users.cpp +++ b/plugins/check_users.cpp @@ -232,4 +232,4 @@ INT check_users(printInfoStruct& printInfo) WTSFreeMemory(pSessionInfo); printInfo.users = users; return -1; -} \ No newline at end of file +} diff --git a/plugins/thresholds.cpp b/plugins/thresholds.cpp index 83fa0239c..16fa5ed92 100644 --- a/plugins/thresholds.cpp +++ b/plugins/thresholds.cpp @@ -226,4 +226,4 @@ VOID die(DWORD err) std::wcout << "Failed to format error message, last error was: " << err << '\n'; else std::wcout << mBuf << std::endl; -} \ No newline at end of file +} -- 2.50.1