From 659df12389d2c51fa2ee569d61d6033fbf8a09e0 Mon Sep 17 00:00:00 2001 From: Pixel Date: Fri, 6 Apr 2012 13:50:24 -0700 Subject: Small improvements on the SimpleMustache processor, in order to be able to make it const, and to construct template out of constant strings. --- src/HttpServer.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/HttpServer.cc') diff --git a/src/HttpServer.cc b/src/HttpServer.cc index 2e3f703..69d58cd 100644 --- a/src/HttpServer.cc +++ b/src/HttpServer.cc @@ -35,6 +35,8 @@ class HttpWorker : public Task { HttpWorker(IO io, void * server); ~HttpWorker(); static void buildErrorTemplate(IO h) { m_errorTemplate.setTemplate(h); } + template + static void buildErrorTemplate(const char str[S]) { m_errorTemplate.setTemplate(str, S); } static void buildErrorTemplate(const char * str, ssize_t s) { m_errorTemplate.setTemplate(str, s); } static void buildErrorTemplate(const String & str) { m_errorTemplate.setTemplate(str); } private: -- cgit v1.2.3