susumu.yata
null+****@clear*****
Thu Feb 14 10:19:30 JST 2013
susumu.yata 2013-02-14 10:19:30 +0900 (Thu, 14 Feb 2013) New Revision: 61806840ad3b1e82fbf87a2da3e5ba400c252c7f https://github.com/groonga/grnxx/commit/61806840ad3b1e82fbf87a2da3e5ba400c252c7f Log: Add default arguments. Modified files: lib/map/da/basic_trie.hpp lib/map/da/trie.hpp lib/map/double_array.hpp Modified: lib/map/da/basic_trie.hpp (+5 -4) =================================================================== --- lib/map/da/basic_trie.hpp 2013-02-13 18:41:52 +0900 (bf1b135) +++ lib/map/da/basic_trie.hpp 2013-02-14 10:19:30 +0900 (1a9f7f5) @@ -407,16 +407,17 @@ class Trie : public da::Trie { uint32_t block_id() const; - bool search(int64_t key_id, Slice *key); - bool search(const Slice &key, int64_t *key_id); + bool search(int64_t key_id, Slice *key = nullptr); + bool search(const Slice &key, int64_t *key_id = nullptr); - bool insert(const Slice &key, int64_t *key_id); + bool insert(const Slice &key, int64_t *key_id = nullptr); bool remove(int64_t key_id); bool remove(const Slice &key); bool update(int64_t key_id, const Slice &dest_key); - bool update(const Slice &src_key, const Slice &dest_key, int64_t *key_id); + bool update(const Slice &src_key, const Slice &dest_key, + int64_t *key_id = nullptr); private: io::Pool pool_; Modified: lib/map/da/trie.hpp (+4 -4) =================================================================== --- lib/map/da/trie.hpp 2013-02-13 18:41:52 +0900 (1d13c6e) +++ lib/map/da/trie.hpp 2013-02-14 10:19:30 +0900 (6376a79) @@ -41,17 +41,17 @@ class Trie { virtual uint32_t block_id() const = 0; - virtual bool search(int64_t key_id, Slice *key) = 0; - virtual bool search(const Slice &key, int64_t *key_id) = 0; + virtual bool search(int64_t key_id, Slice *key = nullptr) = 0; + virtual bool search(const Slice &key, int64_t *key_id = nullptr) = 0; - virtual bool insert(const Slice &key, int64_t *key_id) = 0; + virtual bool insert(const Slice &key, int64_t *key_id = nullptr) = 0; virtual bool remove(int64_t key_id) = 0; virtual bool remove(const Slice &key) = 0; virtual bool update(int64_t key_id, const Slice &dest_key) = 0; virtual bool update(const Slice &src_key, const Slice &dest_key, - int64_t *key_id) = 0; + int64_t *key_id = nullptr) = 0; }; } // namespace da Modified: lib/map/double_array.hpp (+5 -4) =================================================================== --- lib/map/double_array.hpp 2013-02-13 18:41:52 +0900 (d2c5583) +++ lib/map/double_array.hpp 2013-02-14 10:19:30 +0900 (d71d07c) @@ -45,16 +45,17 @@ class DoubleArray : public Map { uint32_t block_id() const; - bool search(int64_t key_id, Slice *key); - bool search(const Slice &key, int64_t *key_id); + bool search(int64_t key_id, Slice *key = nullptr); + bool search(const Slice &key, int64_t *key_id = nullptr); - bool insert(const Slice &key, int64_t *key_id); + bool insert(const Slice &key, int64_t *key_id = nullptr); bool remove(int64_t key_id); bool remove(const Slice &key); bool update(int64_t key_id, const Slice &dest_key); - bool update(const Slice &src_key, const Slice &dest_key, int64_t *key_id); + bool update(const Slice &src_key, const Slice &dest_key, + int64_t *key_id = nullptr); private: DoubleArray(); -------------- next part -------------- HTML����������������������������...다운로드