-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed bug in Query that prevented find_next() from being started at an arbitrary position. #137
Conversation
out << setw(index_width+1) << left << " "; | ||
out << setw(name_width+1) << left << "tables"; | ||
out << setw(rows_width) << left << "rows" << endl; | ||
out << setw(int(index_width)+1) << left << " "; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old-style casts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What? That is not an old-style cast. The old-style cast syntax is characterized by a type surrounded by parentheses. "int(index_width)" is a so-called functional cast, and is a natural part of modern C++.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:-) selvfølgelig - der var jeg lige lidt hurtig...
// Brian
On Wed, Aug 28, 2013 at 11:15 PM, Kristian Spangsege <
notifications@github.com> wrote:
In src/tightdb/group.cpp:
@@ -489,9 +489,9 @@ void Group::to_string(ostream& out) const
// Print header
- out << setw(index_width+1) << left << " ";
- out << setw(name_width+1) << left << "tables";
- out << setw(rows_width) << left << "rows" << endl;
- out << setw(int(index_width)+1) << left << " ";
What? That is not an old-style cast. The old-style cast syntax is
characterized by a type surrounded by parentheses. "int(index_width)" is a
so-called functional cast, and is a natural part of modern C++.—
Reply to this email directly or view it on GitHubhttps://github.com//pull/137/files#r6046722
.
Missing update of documentation, testcases and changes.txt. |
There is a test case and the docs does not mention that you had to start at -1. It is just a bugfix. |
Ok. +1. // Brian On Thu, Aug 29, 2013 at 2:38 AM, astigsen notifications@github.com wrote:
|
|
On Thu, Aug 29, 2013 at 4:42 AM, Lasse Reinhold notifications@github.comwrote:
|
…y_findnext_fix Conflicts: src/tightdb/group_shared.cpp src/tightdb/query.cpp src/tightdb/table_basic.hpp test/test_query.cpp test/testsettings.hpp
…y_findnext_fix Conflicts: src/tightdb/group.cpp
Fixed bug in Query that prevented find_next() from being started at an arbitrary position.
find_next() only initialized the query when started from position -1. This made it impossible to change query during a search (for positional queries).
@rrrlasse