Skip to content

Instantly share code, notes, and snippets.

@wpoely86
Created January 24, 2018 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpoely86/31292e819aec84b20ce30b8d324b3d87 to your computer and use it in GitHub Desktop.
Save wpoely86/31292e819aec84b20ce30b8d324b3d87 to your computer and use it in GitHub Desktop.
diff --git a/hit.h b/hit.h
index f414211..2e5a1e6 100644
--- a/hit.h
+++ b/hit.h
@@ -640,10 +640,26 @@ protected:
s.moveTo(btString);
}
+ batch(const batch &other)
+ {
+ batchId = other.batchId;
+ isWritten = other.isWritten;
+ btString = other.btString;
+ }
+
bool operator<(const batch& other) const {
return batchId < other.batchId;
}
+ batch& operator=(batch&& other) {
+ if (&other != this) {
+ batchId = other.batchId;
+ isWritten = other.isWritten;
+ other.btString.moveTo(btString);
+ }
+ return *this;
+ }
+
batch& operator=(batch& other) {
if (&other != this) {
batchId = other.batchId;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment