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
1=== modified file 'src/runtime/full_text/ft_module_impl.cpp'
2--- src/runtime/full_text/ft_module_impl.cpp 2012-07-24 08:48:48 +0000
3+++ src/runtime/full_text/ft_module_impl.cpp 2012-08-03 03:21:19 +0000
4@@ -958,7 +958,7 @@
5 tokenizer->tokenize_string(
6 value_string.data(), value_string.size(), lang, false, callback
7 );
8- state->string_tokens_.take( callback.tokens_ );
9+ state->string_tokens_.swap( callback.tokens_ );
10 } // local scope
11
12 while ( state->string_tokens_.hasNext() ) {
13
14=== modified file 'src/runtime/full_text/ft_token_seq_iterator.cpp'
15--- src/runtime/full_text/ft_token_seq_iterator.cpp 2012-07-24 08:48:48 +0000
16+++ src/runtime/full_text/ft_token_seq_iterator.cpp 2012-08-03 03:21:19 +0000
17@@ -25,7 +25,7 @@
18 namespace zorba {
19
20 FTTokenSeqIterator::FTTokenSeqIterator( FTTokens &tokens ) {
21- take( tokens );
22+ swap( tokens );
23 }
24
25 FTTokenSeqIterator::~FTTokenSeqIterator() {
26@@ -60,7 +60,7 @@
27 pos_ = 0;
28 }
29
30-void FTTokenSeqIterator::take( FTTokens &tokens ) {
31+void FTTokenSeqIterator::swap( FTTokens &tokens ) {
32 tokens.swap( tokens_ );
33 pos_ = 0;
34 }
35
36=== modified file 'src/runtime/full_text/ft_token_seq_iterator.h'
37--- src/runtime/full_text/ft_token_seq_iterator.h 2012-07-24 08:48:48 +0000
38+++ src/runtime/full_text/ft_token_seq_iterator.h 2012-08-03 03:21:19 +0000
39@@ -37,7 +37,7 @@
40 FTTokenSeqIterator( FTTokens& );
41 ~FTTokenSeqIterator();
42
43- void take( FTTokens& );
44+ void swap( FTTokens& );
45
46 // inherited
47 index_t begin() const;
48
49=== modified file 'src/util/hash/hashtable.tcc'
50--- src/util/hash/hashtable.tcc 2012-07-11 15:38:39 +0000
51+++ src/util/hash/hashtable.tcc 2012-08-03 03:21:19 +0000
52@@ -48,7 +48,6 @@
53 node *const p = node_alloc_.allocate( 1 );
54 try {
55 node_alloc_.construct( p, v );
56- p->next_ = nullptr;
57 return p;
58 }
59 catch ( ... ) {
60
61=== modified file 'src/util/string/rstring.tcc'
62--- src/util/string/rstring.tcc 2012-07-24 08:48:48 +0000
63+++ src/util/string/rstring.tcc 2012-08-03 03:21:19 +0000
64@@ -461,7 +461,7 @@
65 s.rep().set_sharable();
66
67 if ( get_allocator() == s.get_allocator() ) {
68- rep().swap(s.rep());
69+ rep().swap( s.rep() );
70 } else {
71 rstring const temp1( ibegin(), iend(), s.get_allocator() );
72 rstring const temp2( s.ibegin(), s.iend(), get_allocator() );

Subscribers

People subscribed via source and target branches