diff options
Diffstat (limited to 'tutorial')
-rw-r--r-- | tutorial/cpp/CppClient.cpp | 1 | ||||
-rw-r--r-- | tutorial/cpp/CppServer.cpp | 19 | ||||
-rwxr-xr-x | tutorial/cpp/Makefile.am | 3 |
3 files changed, 8 insertions, 15 deletions
diff --git a/tutorial/cpp/CppClient.cpp b/tutorial/cpp/CppClient.cpp index 44753383d..258cbd66d 100644 --- a/tutorial/cpp/CppClient.cpp +++ b/tutorial/cpp/CppClient.cpp @@ -76,5 +76,4 @@ int main() { } catch (TException& tx) { cout << "ERROR: " << tx.what() << endl; } - } diff --git a/tutorial/cpp/CppServer.cpp b/tutorial/cpp/CppServer.cpp index 133d75d44..84b79d420 100644 --- a/tutorial/cpp/CppServer.cpp +++ b/tutorial/cpp/CppServer.cpp @@ -44,12 +44,10 @@ using namespace tutorial; using namespace shared; class CalculatorHandler : public CalculatorIf { - public: +public: CalculatorHandler() {} - void ping() { - cout << "ping()" << endl; - } + void ping() { cout << "ping()" << endl; } int32_t add(const int32_t n1, const int32_t n2) { cout << "add(" << n1 << ", " << n2 << ")" << endl; @@ -95,18 +93,15 @@ class CalculatorHandler : public CalculatorIf { return val; } - void getStruct(SharedStruct &ret, const int32_t logid) { + void getStruct(SharedStruct& ret, const int32_t logid) { cout << "getStruct(" << logid << ")" << endl; ret = log[logid]; } - void zip() { - cout << "zip()" << endl; - } + void zip() { cout << "zip()" << endl; } protected: map<int32_t, SharedStruct> log; - }; int main() { @@ -116,11 +111,7 @@ int main() { boost::shared_ptr<TServerTransport> serverTransport(new TServerSocket(9090)); boost::shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory()); - TSimpleServer server(processor, - serverTransport, - transportFactory, - protocolFactory); - + TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory); /** * Or you could do one of these diff --git a/tutorial/cpp/Makefile.am b/tutorial/cpp/Makefile.am index 9768c5189..3b382403c 100755 --- a/tutorial/cpp/Makefile.am +++ b/tutorial/cpp/Makefile.am @@ -76,6 +76,9 @@ tutorialserver: all tutorialclient: all ./TutorialClient +style-local: + $(CPPSTYLE_CMD) + EXTRA_DIST = \ CppClient.cpp \ CppServer.cpp |