Paul J. Lucas has proposed merging lp:~paul-lucas/zorba/pjl-misc into lp:zorba.

Requested reviews:
  Paul J. Lucas (paul-lucas)

For more details, see:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/118031

1. s/take/swap/
2. Removed unnecessary assignment.
-- 
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/118031
Your team Zorba Coders is subscribed to branch lp:zorba.
=== 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 @@
     tokenizer->tokenize_string(
       value_string.data(), value_string.size(), lang, false, callback
     );
-    state->string_tokens_.take( callback.tokens_ );
+    state->string_tokens_.swap( callback.tokens_ );
     } // local scope
 
     while ( state->string_tokens_.hasNext() ) {

=== 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 @@
 namespace zorba {
 
 FTTokenSeqIterator::FTTokenSeqIterator( FTTokens &tokens ) {
-  take( tokens );
+  swap( tokens );
 }
 
 FTTokenSeqIterator::~FTTokenSeqIterator() {
@@ -60,7 +60,7 @@
   pos_ = 0;
 }
 
-void FTTokenSeqIterator::take( FTTokens &tokens ) {
+void FTTokenSeqIterator::swap( FTTokens &tokens ) {
   tokens.swap( tokens_ );
   pos_ = 0;
 }

=== 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 @@
   FTTokenSeqIterator( FTTokens& );
   ~FTTokenSeqIterator();
 
-  void take( FTTokens& );
+  void swap( FTTokens& );
 
   // inherited
   index_t begin() const;

=== 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 @@
   node *const p = node_alloc_.allocate( 1 );
   try {
     node_alloc_.construct( p, v );
-    p->next_ = nullptr;
     return p;
   }
   catch ( ... ) {

=== 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 @@
     s.rep().set_sharable();
 
   if ( get_allocator() == s.get_allocator() ) {
-    rep().swap(s.rep());
+    rep().swap( s.rep() );
   } else {
     rstring const temp1( ibegin(), iend(), s.get_allocator() );
     rstring const temp2( s.ibegin(), s.iend(), get_allocator() );

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to