From 922cc72abf22a0456b5a901172d2b03ff6e34a6e Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 22 Feb 2016 23:51:37 +0100 Subject: [PATCH] - yhook: new outSingle() function, that just adds a linefeed to content --- src/nhttpd/yhttpd_core/yhook.cpp | 5 +++++ src/nhttpd/yhttpd_core/yhook.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/nhttpd/yhttpd_core/yhook.cpp b/src/nhttpd/yhttpd_core/yhook.cpp index 6e6d13c51..15c2aef5e 100644 --- a/src/nhttpd/yhttpd_core/yhook.cpp +++ b/src/nhttpd/yhttpd_core/yhook.cpp @@ -424,6 +424,11 @@ std::string CyhookHandler::outIndent() { return ""; } +//----------------------------------------------------------------------------- +std::string CyhookHandler::outSingle(std::string _content) { + return _content + "\n"; +} + //----------------------------------------------------------------------------- std::string CyhookHandler::outPair(std::string _key, std::string _content, bool _next) { std::string result = ""; diff --git a/src/nhttpd/yhttpd_core/yhook.h b/src/nhttpd/yhttpd_core/yhook.h index ca82f9572..096deaef0 100644 --- a/src/nhttpd/yhttpd_core/yhook.h +++ b/src/nhttpd/yhttpd_core/yhook.h @@ -204,6 +204,7 @@ public: TOutType outStart(bool single = false); TOutType getOutType(); std::string outIndent(); + std::string outSingle(std::string _content); std::string outPair(std::string _key, std::string _content, bool _next); std::string outArray(std::string _key, std::string _content); std::string outArrayItem(std::string _key, std::string _content, bool _next);