Skip to content

Commit

Permalink
Merge pull request yedf2#1 from yedf/master
Browse files Browse the repository at this point in the history
update from origin
  • Loading branch information
kyle45 authored Oct 2, 2017
2 parents fdfb0e6 + af0a5cd commit eeb31c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions handy/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct Buffer {
Buffer& absorb(Buffer& buf);
void setSuggestSize(size_t sz) { exp_ = sz; }
Buffer(const Buffer& b) { copyFrom(b); }
Buffer& operator=(const Buffer& b) { delete[] buf_; buf_ = NULL; copyFrom(b); return *this; }
Buffer& operator=(const Buffer& b) { if(this == &b) return *this; delete[] buf_; buf_ = NULL; copyFrom(b); return *this; }
operator Slice () { return Slice(data(), size()); }
private:
char* buf_;
Expand All @@ -65,4 +65,4 @@ struct Buffer {
void copyFrom(const Buffer& b);
};

}
}

0 comments on commit eeb31c2

Please sign in to comment.