Skip to content

Commit

Permalink
move color template file to template folder
Browse files Browse the repository at this point in the history
  • Loading branch information
gsoosk committed May 26, 2019
1 parent 5877ed3 commit 03a8239
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ int main(int argc, char **argv) {
server.get("/rand", new RandomNumberHandler());
server.get("/home.png", new ShowImage("static/home.png"));
server.get("/", new ShowPage("static/home.html"));
server.get("/colors", new ColorHandler("static/colors.html"));
server.get("/colors", new ColorHandler("template/colors.html"));
server.run();
} catch (Server::Exception e) {
cerr << e.getMessage() << endl;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion utils/template_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ string TemplateParser::getHtml(map<string, string> _context) {
void TemplateParser::parseTemplate() {
string unparsedTemplate = readFile(filePath);
int parsePointer = 0;
while (parsePointer < unparsedTemplate.size()) {
while (parsePointer < (signed int) unparsedTemplate.size()) {
int begin = findBeginOfCodeBlock(parsePointer, unparsedTemplate);
int end = findEndOfCodeBlock(parsePointer, unparsedTemplate);
if (begin < 0)
Expand Down

0 comments on commit 03a8239

Please sign in to comment.