From 2fc9ecdc7c1afadd0dea48da819492344d713996 Mon Sep 17 00:00:00 2001 From: antao Date: Wed, 31 Oct 2018 17:33:15 +0800 Subject: [PATCH] Update drogon_ctl --- drogon_ctl/create_view.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drogon_ctl/create_view.cc b/drogon_ctl/create_view.cc index b9b07d2d..0b9012fd 100755 --- a/drogon_ctl/create_view.cc +++ b/drogon_ctl/create_view.cc @@ -90,7 +90,8 @@ static void parseLine(std::ofstream &oSrcFile, std::string &line, const std::str { // std::cout<<"blank line!"< 0) + parseLine(oSrcFile, oldLine, streamName, viewDataName, cxx_flag, 0); std::string newLine = line.substr(pos + cxx_lang.length()); cxx_flag = 1; - parseLine(oSrcFile, newLine, streamName, viewDataName, cxx_flag, returnFlag); + if (newLine.length() > 0) + parseLine(oSrcFile, newLine, streamName, viewDataName, cxx_flag, returnFlag); } else { @@ -179,7 +182,8 @@ static void parseLine(std::ofstream &oSrcFile, std::string &line, const std::str parseCxxLine(oSrcFile, newLine, streamName, viewDataName); std::string oldLine = line.substr(pos + cxx_end.length()); cxx_flag = 0; - parseLine(oSrcFile, oldLine, streamName, viewDataName, cxx_flag, returnFlag); + if (oldLine.length() > 0) + parseLine(oSrcFile, oldLine, streamName, viewDataName, cxx_flag, returnFlag); } else {