[Groonga-commit] groonga/grnxx at 79bc1eb [master] Inline DB member functions.

Back to archive index

susumu.yata null+****@clear*****
Mon Oct 6 22:23:47 JST 2014


susumu.yata	2014-10-06 22:23:47 +0900 (Mon, 06 Oct 2014)

  New Revision: 79bc1eb33dbb71cf30302ce4c51a48626ae8721b
  https://github.com/groonga/grnxx/commit/79bc1eb33dbb71cf30302ce4c51a48626ae8721b

  Message:
    Inline DB member functions.

  Modified files:
    lib/grnxx/impl/db.cpp
    lib/grnxx/impl/db.hpp

  Modified: lib/grnxx/impl/db.cpp (+0 -8)
===================================================================
--- lib/grnxx/impl/db.cpp    2014-10-06 19:27:54 +0900 (f7cf646)
+++ lib/grnxx/impl/db.cpp    2014-10-06 22:23:47 +0900 (5adcf64)
@@ -7,10 +7,6 @@ DB::DB() : grnxx::DB(), tables_() {}
 
 DB::~DB() {}
 
-Int DB::num_tables() const {
-  return tables_.size();
-}
-
 Table *DB::create_table(Error *error,
                         const StringCRef &name,
                         const TableOptions &options) {
@@ -93,10 +89,6 @@ bool DB::reorder_table(Error *error,
   return true;
 }
 
-Table *DB::get_table(Int table_id) const {
-  return tables_[table_id].get();
-}
-
 Table *DB::find_table(Error *error, const StringCRef &name) const {
   for (Int table_id = 0; table_id < num_tables(); ++table_id) {
     if (name == tables_[table_id]->name()) {

  Modified: lib/grnxx/impl/db.hpp (+6 -2)
===================================================================
--- lib/grnxx/impl/db.hpp    2014-10-06 19:27:54 +0900 (18cdb29)
+++ lib/grnxx/impl/db.hpp    2014-10-06 22:23:47 +0900 (013d96b)
@@ -13,7 +13,9 @@ class DB : public grnxx::DB {
   DB();
   ~DB();
 
-  Int num_tables() const;
+  Int num_tables() const {
+    return tables_.size();
+  }
 
   Table *create_table(Error *error,
                       const StringCRef &name,
@@ -26,7 +28,9 @@ class DB : public grnxx::DB {
                      const StringCRef &name,
                      const StringCRef &prev_name);
 
-  Table *get_table(Int table_id) const;
+  Table *get_table(Int table_id) const {
+    return tables_[table_id].get();
+  }
   Table *find_table(Error *error, const StringCRef &name) const;
 
   bool save(Error *error,
-------------- next part --------------
HTML����������������������������...
Download 



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