From ffd652c4e01b4569fe5774b88450008ce3cf589a Mon Sep 17 00:00:00 2001 From: an-tao <20741618@qq.com> Date: Tue, 29 May 2018 13:57:10 +0800 Subject: [PATCH] fix indentation bug --- drogon_ctl/create_controller.cc | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drogon_ctl/create_controller.cc b/drogon_ctl/create_controller.cc index c116f3e2..af941d38 100755 --- a/drogon_ctl/create_controller.cc +++ b/drogon_ctl/create_controller.cc @@ -113,19 +113,22 @@ void create_controller::newSimpleControllerHeaderFile(std::ofstream &file,const file<<"#pragma once\n"; file<<"#include \n"; file<<"using namespace drogon;\n"; - if(namespaceName!="") - file<<"namespace "<\n"; - file<<" {\n"; - file<<" public:\n"; + std::string indent=""; + if(namespaceName!="") { + file << "namespace " << namespaceName << "{\n"; + indent=" "; + } + file<\n"; + file<callback)override;\n"; + file<callback)override;\n"; - file<<" PATH_LIST_BEGIN\n"; - file<<" //list path definations here;\n"; - file<<" //PATH_ADD(\"/path\",\"filter1\",\"filter2\",...);\n"; - file<<" PATH_LIST_END\n"; - file<<" };\n"; + file<