ext/libcouchbase/src/n1ql/ixmgmt.cc in libcouchbase-0.0.7 vs ext/libcouchbase/src/n1ql/ixmgmt.cc in libcouchbase-0.0.8
- old
+ new
@@ -208,11 +208,10 @@
// Class to back the storage for the actual lcb_IXSPEC without doing too much
// mind-numbing buffer copies. Maybe this can be done via a macro instead?
class IndexSpec : public lcb_N1XSPEC {
public:
- IndexSpec(const char *s, size_t n) {
- memset(static_cast<lcb_N1XSPEC*>(this), 0, sizeof (lcb_N1XSPEC));
+ IndexSpec(const char *s, size_t n) : lcb_N1XSPEC() {
load_json(s, n);
}
inline IndexSpec(const lcb_N1XSPEC *spec);
static inline void to_key(const lcb_N1XSPEC *spec, std::string& out);
bool is_primary() const { return flags & LCB_N1XSPEC_F_PRIMARY; }