From 968b8813d6115e1ced9113fcaaf705030b7f3adb Mon Sep 17 00:00:00 2001 From: Chrono Law Date: Mon, 16 Nov 2015 19:31:16 +0800 Subject: [PATCH] str invalid --- ngxpp/NgxValue.hpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ngxpp/NgxValue.hpp b/ngxpp/NgxValue.hpp index da22ba9..4ec7040 100644 --- a/ngxpp/NgxValue.hpp +++ b/ngxpp/NgxValue.hpp @@ -80,13 +80,19 @@ class NgxValue final } } - static void merge(ngx_str_t& c, const ngx_str_t& p, const ngx_str_t& d) +public: + static bool invalid(const ngx_str_t& v) { - if(!c.data) - { - c = p.data ? p : d; - } + return !v.data || !v.len; } + + //static void merge(ngx_str_t& c, const ngx_str_t& p, const ngx_str_t& d) + //{ + // if(!c.data) + // { + // c = p.data ? p : d; + // } + //} }; #endif //_NGX_VALUE_HPP