[Groonga-commit] groonga/grnxx at 1676f38 [master] Update Array::pop_back() to assume that "this" is not empty.

Back to archive index

susumu.yata null+****@clear*****
Fri Jul 25 18:04:55 JST 2014


susumu.yata	2014-07-25 18:04:55 +0900 (Fri, 25 Jul 2014)

  New Revision: 1676f38596a7bee630fb077366066ab8826007e3
  https://github.com/groonga/grnxx/commit/1676f38596a7bee630fb077366066ab8826007e3

  Message:
    Update Array::pop_back() to assume that "this" is not empty.

  Modified files:
    include/grnxx/array.hpp

  Modified: include/grnxx/array.hpp (+1 -6)
===================================================================
--- include/grnxx/array.hpp    2014-07-25 17:58:48 +0900 (25197b6)
+++ include/grnxx/array.hpp    2014-07-25 18:04:55 +0900 (082ddfb)
@@ -114,13 +114,8 @@ class Array {
     ArrayHelper::report_memory_error(error);
     return false;
   }
-  bool pop_back(Error *error) {
-    if (values_.size() == 0) {
-      ArrayHelper::report_empty_error(error);
-      return false;
-    }
+  void pop_back() {
     values_.pop_back();
-    return true;
   }
 
  private:
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index