kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 81c3325677a8851d6a08bb91b70970b9465baebb
parent ec9ea6df369d8fb35d8f54edb08eb94563873c79
Author: Joris Vink <joris@coders.se>
Date:   Tue,  7 Apr 2015 13:11:31 +0200

Style changes.

Diffstat:
examples/cpp/src/cpp.cpp | 9++++++---
examples/cpp/src/example_class.cpp | 4+---
examples/cpp/src/example_class.h | 4+---
3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/examples/cpp/src/cpp.cpp b/examples/cpp/src/cpp.cpp @@ -26,8 +26,11 @@ extern "C" { int page(struct http_request *req) { - example_class example; - const char* str = example.a(); - http_response(req, 200, static_cast<void*>(const_cast<char*>(str)), strlen(str)); + example_class example; + const char *str = example.a(); + + http_response(req, 200, + static_cast<void*>(const_cast<char*>(str)), strlen(str)); + return (KORE_RESULT_OK); } diff --git a/examples/cpp/src/example_class.cpp b/examples/cpp/src/example_class.cpp @@ -17,14 +17,12 @@ #include "example_class.h" example_class::example_class() { - } example_class::~example_class() { - } -const char* +const char * example_class::a() { return "Hello world!"; } diff --git a/examples/cpp/src/example_class.h b/examples/cpp/src/example_class.h @@ -20,13 +20,11 @@ #include <stdio.h> class example_class { - public: example_class(); ~example_class(); - const char* - a(); + const char *a(); }; #endif /* defined(____example_class__) */