From 01e652cc75df737cf8919a84e016afe1dff4aa3e Mon Sep 17 00:00:00 2001 From: Brian Munkholm Date: Thu, 21 Feb 2013 16:20:06 +0100 Subject: [PATCH] BREAKING change: Renamed Group::get_table_count() to size(). (and added missing testcase) --- changelog.txt | 3 +++ doc/ref_cpp/data/group_ref.yaml | 5 +++-- doc/ref_cpp/examples/group_traverse.cpp | 2 +- src/tightdb/group.cpp | 6 +++--- src/tightdb/group.hpp | 4 ++-- test/testgroup.cpp | 16 ++++++++++++++++ 6 files changed, 28 insertions(+), 8 deletions(-) diff --git a/changelog.txt b/changelog.txt index d19aae7e0d6..f7e6c8359a5 100644 --- a/changelog.txt +++ b/changelog.txt @@ -13,6 +13,9 @@ Format: ================== +2013-02-21 (Brian Munkholm +-+ Renamed Group::get_table_count() to Group::size() + 2013-02-19 (Kristian Spangsege) + Type of Group::BufferSpec::m_data changed from to . diff --git a/doc/ref_cpp/data/group_ref.yaml b/doc/ref_cpp/data/group_ref.yaml index f27e85e3db1..9173d485d21 100644 --- a/doc/ref_cpp/data/group_ref.yaml +++ b/doc/ref_cpp/data/group_ref.yaml @@ -123,10 +123,11 @@ CATEGORIES: EXAMPLES: - DESCR : CODE : ex_cpp_group_operator_equal + - Table: METHODS: - - g_group_table_count: - NAMES : get_table_count + - g_group_size: + NAMES : size DESCR : > A group can be a container for many tables, and this method counts the number of tables currently stored in the group. diff --git a/doc/ref_cpp/examples/group_traverse.cpp b/doc/ref_cpp/examples/group_traverse.cpp index 746b6e025a6..446fb3284e6 100644 --- a/doc/ref_cpp/examples/group_traverse.cpp +++ b/doc/ref_cpp/examples/group_traverse.cpp @@ -13,7 +13,7 @@ TIGHTDB_TABLE_2(PeopleTable, void traverse(const Group& group) { // @@EndFold@@ - for (size_t i=0; iget_column_count() << "\n"; diff --git a/src/tightdb/group.cpp b/src/tightdb/group.cpp index ac11701b8e2..58be8518283 100644 --- a/src/tightdb/group.cpp +++ b/src/tightdb/group.cpp @@ -507,8 +507,8 @@ void Group::update_from_shared(size_t top_ref, size_t len) bool Group::operator==(const Group& g) const { - const size_t n = get_table_count(); - if (n != g.get_table_count()) return false; + const size_t n = size(); + if (n != g.size()) return false; for (size_t i=0; i