diff options
author | Pixel <pixel@nobis-crew.org> | 2012-04-06 13:50:24 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2012-04-06 13:50:24 -0700 |
commit | 659df12389d2c51fa2ee569d61d6033fbf8a09e0 (patch) | |
tree | 47380b7a1204f28f4a26e782272bdf5f6406f1e4 /src/HttpServer.cc | |
parent | 837ded8434ebe7048907008723929ecee2c9f83a (diff) |
Small improvements on the SimpleMustache processor, in order to be able to make it const, and to construct template out of constant strings.
Diffstat (limited to 'src/HttpServer.cc')
-rw-r--r-- | src/HttpServer.cc | 2 |
1 files changed, 2 insertions, 0 deletions
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<Handle> io, void * server); ~HttpWorker(); static void buildErrorTemplate(IO<Handle> h) { m_errorTemplate.setTemplate(h); } + template<size_t S> + 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: |