susumu.yata
null+****@clear*****
Fri Sep 5 14:46:23 JST 2014
susumu.yata 2014-09-05 14:46:23 +0900 (Fri, 05 Sep 2014) New Revision: 1c188df0683e9045e77591dea7ad23a767ebb6c7 https://github.com/groonga/grnxx/commit/1c188df0683e9045e77591dea7ad23a767ebb6c7 Message: Use pass-by-reference for ArrayCRef<Bool> and ArrayRef<Bool>. Modified files: include/grnxx/array/bool.hpp Modified: include/grnxx/array/bool.hpp (+6 -6) =================================================================== --- include/grnxx/array/bool.hpp 2014-09-05 14:39:18 +0900 (e74b94d) +++ include/grnxx/array/bool.hpp 2014-09-05 14:46:23 +0900 (e79da1c) @@ -18,12 +18,12 @@ class ArrayCRef<Bool> { ArrayCRef &operator=(const ArrayCRef &) = default; - bool operator==(ArrayCRef<Value> rhs) const { + bool operator==(const ArrayCRef<Value> &rhs) const { return (blocks_ == rhs.blocks_) && (offset_ == rhs.offset_) && (size_ == rhs.size_); } - bool operator!=(ArrayCRef<Value> rhs) const { + bool operator!=(const ArrayCRef<Value> &rhs) const { return (blocks_ != rhs.blocks_) || (offset_ != rhs.offset_) || (size_ != rhs.size_); @@ -84,23 +84,23 @@ class ArrayRef<Bool> { ArrayRef &operator=(const ArrayRef &) = default; - bool operator==(ArrayCRef<Value> rhs) const { + bool operator==(const ArrayCRef<Value> &rhs) const { return (blocks_ == rhs.blocks_) && (offset_ == rhs.offset_) && (size_ == rhs.size_); } - bool operator==(ArrayRef<Value> rhs) const { + bool operator==(const ArrayRef<Value> &rhs) const { return (blocks_ == rhs.blocks_) && (offset_ == rhs.offset_) && (size_ == rhs.size_); } - bool operator!=(ArrayCRef<Value> rhs) const { + bool operator!=(const ArrayCRef<Value> &rhs) const { return (blocks_ != rhs.blocks_) || (offset_ != rhs.offset_) || (size_ != rhs.size_); } - bool operator!=(ArrayRef<Value> rhs) const { + bool operator!=(const ArrayRef<Value> &rhs) const { return (blocks_ == rhs.blocks_) || (offset_ == rhs.offset_) || (size_ == rhs.size_); -------------- next part -------------- HTML����������������������������... Download