susumu.yata
null+****@clear*****
Tue Dec 2 18:04:54 JST 2014
susumu.yata 2014-12-02 18:04:54 +0900 (Tue, 02 Dec 2014) New Revision: b19bc8ff61391fdb458598984e88f01ece88c090 https://github.com/groonga/grnxx/commit/b19bc8ff61391fdb458598984e88f01ece88c090 Message: Simplify find_starts_with(). Modified files: lib/grnxx/impl/index.cpp Modified: lib/grnxx/impl/index.cpp (+1 -2) =================================================================== --- lib/grnxx/impl/index.cpp 2014-12-02 18:03:46 +0900 (d3885ce) +++ lib/grnxx/impl/index.cpp 2014-12-02 18:04:54 +0900 (8488382) @@ -779,7 +779,6 @@ std::unique_ptr<Cursor> TreeIndex<Text>::find_in_range( std::unique_ptr<Cursor> TreeIndex<Text>::find_starts_with( const EndPoint &prefix, const CursorOptions &options) const { - String lower_bound_value; // TODO: Typecast will be supported in future? if (prefix.value.type() != TEXT_DATA) { throw "Data type conflict"; // TODO @@ -788,7 +787,7 @@ std::unique_ptr<Cursor> TreeIndex<Text>::find_starts_with( if (text.is_na()) { throw "No prefix"; // TODO } - lower_bound_value = String(text.raw_data(), text.raw_size()); + String lower_bound_value(text.raw_data(), text.raw_size()); String upper_bound_value = lower_bound_value.clone(); while (!upper_bound_value.is_empty() && -------------- next part -------------- HTML����������������������������... Download