Skip to content

Commit 968b881

Browse files
author
Chrono Law
committed
str invalid
1 parent bfb57ec commit 968b881

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

ngxpp/NgxValue.hpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,19 @@ class NgxValue final
8080
}
8181
}
8282

83-
static void merge(ngx_str_t& c, const ngx_str_t& p, const ngx_str_t& d)
83+
public:
84+
static bool invalid(const ngx_str_t& v)
8485
{
85-
if(!c.data)
86-
{
87-
c = p.data ? p : d;
88-
}
86+
return !v.data || !v.len;
8987
}
88+
89+
//static void merge(ngx_str_t& c, const ngx_str_t& p, const ngx_str_t& d)
90+
//{
91+
// if(!c.data)
92+
// {
93+
// c = p.data ? p : d;
94+
// }
95+
//}
9096
};
9197

9298
#endif //_NGX_VALUE_HPP

0 commit comments

Comments
 (0)