From 7d78bad1def15c30045167b6127e3c1571ee68df Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Wed, 17 Sep 2014 11:43:53 +0300 Subject: [PATCH] Apply coding style --- src/client/main.cpp | 9 ++++++--- src/server/rccpp.cpp | 3 ++- test/testmodules/__loader/server/init.cpp | 6 ++++-- test/testmodules/test1/server/init.cpp | 3 ++- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/client/main.cpp b/src/client/main.cpp index f40d1f1..80bf5c1 100644 --- a/src/client/main.cpp +++ b/src/client/main.cpp @@ -142,7 +142,8 @@ static int customError(lua_State *L){ printf("---------------------\n"); printf("Backtrace\n"); for(size_t i = 0; i < backTrace.size(); i++){ - printf("* %s on line %d", backTrace[i].fileName.c_str(), backTrace[i].lineNumber); + printf("* %s on line %d", backTrace[i].fileName.c_str(), + backTrace[i].lineNumber); } printf("\n---------------------\n"); @@ -192,8 +193,10 @@ HelloPolycodeApp::HelloPolycodeApp(Polycode::PolycodeView *view): // SDLCore for Linux core = new POLYCODE_CORE(view, 640, 480, false, false, 0, 0, 90, 1, true); - Polycode::CoreServices::getInstance()->getResourceManager()->addArchive(g_client_config.share_path+"/default.pak"); - Polycode::CoreServices::getInstance()->getResourceManager()->addDirResource("default", false); + Polycode::CoreServices::getInstance()->getResourceManager()->addArchive( + g_client_config.share_path+"/default.pak"); + Polycode::CoreServices::getInstance()->getResourceManager()->addDirResource("default", + false); scene = new Polycode::Scene(Polycode::Scene::SCENE_2D); scene->getActiveCamera()->setOrthoSize(640, 480); diff --git a/src/server/rccpp.cpp b/src/server/rccpp.cpp index 40bd320..c2fcb86 100644 --- a/src/server/rccpp.cpp +++ b/src/server/rccpp.cpp @@ -155,7 +155,8 @@ void* CCompiler::construct(const char *name, interface::Server *server){ auto it = constructed_objects.find(std::string(name)); - if(it == constructed_objects.end()) constructed_objects.insert(std::make_pair(name, std::vector {result})); + if(it == constructed_objects.end()) constructed_objects.insert(std::make_pair( + name, std::vector {result})); else it->second.push_back(result); return result; diff --git a/test/testmodules/__loader/server/init.cpp b/test/testmodules/__loader/server/init.cpp index 945a058..488c515 100644 --- a/test/testmodules/__loader/server/init.cpp +++ b/test/testmodules/__loader/server/init.cpp @@ -15,7 +15,8 @@ struct Module: public interface::Module Module(interface::Server *server): m_server(server), - m_EventType_core_load_modules(interface::getGlobalEventRegistry()->type("core:load_modules")) + m_EventType_core_load_modules( + interface::getGlobalEventRegistry()->type("core:load_modules")) { std::cout<<"__loader construct"<load_module("network", m_server->get_builtin_modules_path()+"/network"); + m_server->load_module("network", + m_server->get_builtin_modules_path()+"/network"); sv_ load_list = {"test1", "test2"}; for(const ss_ &name : load_list){ diff --git a/test/testmodules/test1/server/init.cpp b/test/testmodules/test1/server/init.cpp index d74ef77..1858556 100644 --- a/test/testmodules/test1/server/init.cpp +++ b/test/testmodules/test1/server/init.cpp @@ -15,7 +15,8 @@ struct Module: public interface::Module Module(interface::Server *server): m_server(server), - m_EventType_test1_thing(interface::getGlobalEventRegistry()->type("test1:thing")) + m_EventType_test1_thing( + interface::getGlobalEventRegistry()->type("test1:thing")) { std::cout<<"test1 construct"<