Merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba

Proposed by Paul J. Lucas
Status: Merged
Approved by: Matthias Brantner
Approved revision: 10963
Merged at revision: 10966
Proposed branch: lp:~paul-lucas/zorba/pjl-misc
Merge into: lp:zorba
Diff against target: 72 lines (+5/-6)
5 files modified
src/runtime/full_text/ft_module_impl.cpp (+1/-1)
src/runtime/full_text/ft_token_seq_iterator.cpp (+2/-2)
src/runtime/full_text/ft_token_seq_iterator.h (+1/-1)
src/util/hash/hashtable.tcc (+0/-1)
src/util/string/rstring.tcc (+1/-1)
To merge this branch: bzr merge lp:~paul-lucas/zorba/pjl-misc
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Paul J. Lucas Approve
Review via email: mp+118031@code.launchpad.net

Commit message

1. s/take/swap/
2. Removed unnecessary assignment.

Description of the change

1. s/take/swap/
2. Removed unnecessary assignment.

To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job pjl-misc-2012-08-03T03-37-58.302Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/runtime/full_text/ft_module_impl.cpp'
--- src/runtime/full_text/ft_module_impl.cpp 2012-07-24 08:48:48 +0000
+++ src/runtime/full_text/ft_module_impl.cpp 2012-08-03 03:21:19 +0000
@@ -958,7 +958,7 @@
958 tokenizer->tokenize_string(958 tokenizer->tokenize_string(
959 value_string.data(), value_string.size(), lang, false, callback959 value_string.data(), value_string.size(), lang, false, callback
960 );960 );
961 state->string_tokens_.take( callback.tokens_ );961 state->string_tokens_.swap( callback.tokens_ );
962 } // local scope962 } // local scope
963963
964 while ( state->string_tokens_.hasNext() ) {964 while ( state->string_tokens_.hasNext() ) {
965965
=== modified file 'src/runtime/full_text/ft_token_seq_iterator.cpp'
--- src/runtime/full_text/ft_token_seq_iterator.cpp 2012-07-24 08:48:48 +0000
+++ src/runtime/full_text/ft_token_seq_iterator.cpp 2012-08-03 03:21:19 +0000
@@ -25,7 +25,7 @@
25namespace zorba {25namespace zorba {
2626
27FTTokenSeqIterator::FTTokenSeqIterator( FTTokens &tokens ) {27FTTokenSeqIterator::FTTokenSeqIterator( FTTokens &tokens ) {
28 take( tokens );28 swap( tokens );
29}29}
3030
31FTTokenSeqIterator::~FTTokenSeqIterator() {31FTTokenSeqIterator::~FTTokenSeqIterator() {
@@ -60,7 +60,7 @@
60 pos_ = 0;60 pos_ = 0;
61}61}
6262
63void FTTokenSeqIterator::take( FTTokens &tokens ) {63void FTTokenSeqIterator::swap( FTTokens &tokens ) {
64 tokens.swap( tokens_ );64 tokens.swap( tokens_ );
65 pos_ = 0;65 pos_ = 0;
66}66}
6767
=== modified file 'src/runtime/full_text/ft_token_seq_iterator.h'
--- src/runtime/full_text/ft_token_seq_iterator.h 2012-07-24 08:48:48 +0000
+++ src/runtime/full_text/ft_token_seq_iterator.h 2012-08-03 03:21:19 +0000
@@ -37,7 +37,7 @@
37 FTTokenSeqIterator( FTTokens& );37 FTTokenSeqIterator( FTTokens& );
38 ~FTTokenSeqIterator();38 ~FTTokenSeqIterator();
3939
40 void take( FTTokens& );40 void swap( FTTokens& );
4141
42 // inherited42 // inherited
43 index_t begin() const;43 index_t begin() const;
4444
=== modified file 'src/util/hash/hashtable.tcc'
--- src/util/hash/hashtable.tcc 2012-07-11 15:38:39 +0000
+++ src/util/hash/hashtable.tcc 2012-08-03 03:21:19 +0000
@@ -48,7 +48,6 @@
48 node *const p = node_alloc_.allocate( 1 );48 node *const p = node_alloc_.allocate( 1 );
49 try {49 try {
50 node_alloc_.construct( p, v );50 node_alloc_.construct( p, v );
51 p->next_ = nullptr;
52 return p;51 return p;
53 }52 }
54 catch ( ... ) {53 catch ( ... ) {
5554
=== modified file 'src/util/string/rstring.tcc'
--- src/util/string/rstring.tcc 2012-07-24 08:48:48 +0000
+++ src/util/string/rstring.tcc 2012-08-03 03:21:19 +0000
@@ -461,7 +461,7 @@
461 s.rep().set_sharable();461 s.rep().set_sharable();
462462
463 if ( get_allocator() == s.get_allocator() ) {463 if ( get_allocator() == s.get_allocator() ) {
464 rep().swap(s.rep());464 rep().swap( s.rep() );
465 } else {465 } else {
466 rstring const temp1( ibegin(), iend(), s.get_allocator() );466 rstring const temp1( ibegin(), iend(), s.get_allocator() );
467 rstring const temp2( s.ibegin(), s.iend(), get_allocator() );467 rstring const temp2( s.ibegin(), s.iend(), get_allocator() );

Subscribers

People subscribed via source and target branches