From 1c31677a6425829bef6ec7c877b03ead297963d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 26 Feb 2018 12:49:15 +0200 Subject: [PATCH] Use 4 spaces for indentation in test applications --- hello/hello-exception.cpp | 60 +++++++++++++++++++-------------------- hello/hello-tls.c | 42 +++++++++++++-------------- hello/hello.c | 4 +-- hello/hello.cpp | 16 +++++------ 4 files changed, 61 insertions(+), 61 deletions(-) diff --git a/hello/hello-exception.cpp b/hello/hello-exception.cpp index 6c3d0f4..e7fe739 100644 --- a/hello/hello-exception.cpp +++ b/hello/hello-exception.cpp @@ -3,47 +3,47 @@ class Hello { public: - Hello() { - printf("Hello ctor\n"); - } - ~Hello() { - printf("Hello dtor\n"); - } + Hello() { + printf("Hello ctor\n"); + } + ~Hello() { + printf("Hello dtor\n"); + } }; Hello global_h; class RecurseClass { public: - RecurseClass(int v) : val(v) { - printf("ctor %d\n", val); - } - ~RecurseClass() { - printf("dtor %d\n", val); - } + RecurseClass(int v) : val(v) { + printf("ctor %d\n", val); + } + ~RecurseClass() { + printf("dtor %d\n", val); + } private: - int val; + int val; }; void recurse(int val) { - RecurseClass obj(val); - if (val == 0) { - throw std::exception(); - } - if (val == 5) { - try { - recurse(val - 1); - } catch (std::exception& e) { - printf("caught exception at %d\n", val); - } - } else { - recurse(val - 1); - } - printf("finishing function recurse %d\n", val); + RecurseClass obj(val); + if (val == 0) { + throw std::exception(); + } + if (val == 5) { + try { + recurse(val - 1); + } catch (std::exception& e) { + printf("caught exception at %d\n", val); + } + } else { + recurse(val - 1); + } + printf("finishing function recurse %d\n", val); } int main(int argc, char* argv[]) { - std::cout<<"Hello world C++"< int main(int argc, char* argv[]) { - printf("hello world! %f\n", 42.0); - return 0; + printf("hello world! %f\n", 42.0); + return 0; } diff --git a/hello/hello.cpp b/hello/hello.cpp index 882e900..7530413 100644 --- a/hello/hello.cpp +++ b/hello/hello.cpp @@ -2,17 +2,17 @@ class Hello { public: - Hello() { - printf("Hello ctor\n"); - } - ~Hello() { - printf("Hello dtor\n"); - } + Hello() { + printf("Hello ctor\n"); + } + ~Hello() { + printf("Hello dtor\n"); + } }; Hello global_h; int main(int argc, char* argv[]) { - std::cout<<"Hello world C++"<