Update drogon_ctl

This commit is contained in:
antao 2018-10-31 17:33:15 +08:00
parent 892cd420da
commit 2fc9ecdc7c
1 changed files with 8 additions and 4 deletions

View File

@ -90,6 +90,7 @@ static void parseLine(std::ofstream &oSrcFile, std::string &line, const std::str
{ {
// std::cout<<"blank line!"<<std::endl; // std::cout<<"blank line!"<<std::endl;
// std::cout<<streamName<<"<<\"\\n\";\n"; // std::cout<<streamName<<"<<\"\\n\";\n";
if (returnFlag)
oSrcFile << streamName << "<<\"\\n\";\n"; oSrcFile << streamName << "<<\"\\n\";\n";
return; return;
} }
@ -99,9 +100,11 @@ static void parseLine(std::ofstream &oSrcFile, std::string &line, const std::str
if ((pos = line.find(cxx_lang)) != std::string::npos) if ((pos = line.find(cxx_lang)) != std::string::npos)
{ {
std::string oldLine = line.substr(0, pos); std::string oldLine = line.substr(0, pos);
if (oldLine.length() > 0)
parseLine(oSrcFile, oldLine, streamName, viewDataName, cxx_flag, 0); parseLine(oSrcFile, oldLine, streamName, viewDataName, cxx_flag, 0);
std::string newLine = line.substr(pos + cxx_lang.length()); std::string newLine = line.substr(pos + cxx_lang.length());
cxx_flag = 1; cxx_flag = 1;
if (newLine.length() > 0)
parseLine(oSrcFile, newLine, streamName, viewDataName, cxx_flag, returnFlag); parseLine(oSrcFile, newLine, streamName, viewDataName, cxx_flag, returnFlag);
} }
else else
@ -179,6 +182,7 @@ static void parseLine(std::ofstream &oSrcFile, std::string &line, const std::str
parseCxxLine(oSrcFile, newLine, streamName, viewDataName); parseCxxLine(oSrcFile, newLine, streamName, viewDataName);
std::string oldLine = line.substr(pos + cxx_end.length()); std::string oldLine = line.substr(pos + cxx_end.length());
cxx_flag = 0; cxx_flag = 0;
if (oldLine.length() > 0)
parseLine(oSrcFile, oldLine, streamName, viewDataName, cxx_flag, returnFlag); parseLine(oSrcFile, oldLine, streamName, viewDataName, cxx_flag, returnFlag);
} }
else else