Merge pull request #260 from ejsd1989/issue-#242
Removes redundant null pointer checks checks
This commit is contained in:
commit
d41db75dcb
2 changed files with 2 additions and 4 deletions
|
@ -107,7 +107,7 @@ class MockGeneratorContext : public GeneratorContext {
|
|||
|
||||
virtual io::ZeroCopyOutputStream* Open(const string& filename) {
|
||||
string** map_slot = &files_[filename];
|
||||
if (*map_slot != NULL) delete *map_slot;
|
||||
delete *map_slot;
|
||||
*map_slot = new string;
|
||||
|
||||
return new io::StringOutputStream(*map_slot);
|
||||
|
|
|
@ -241,9 +241,7 @@ void GzipOutputStream::Init(ZeroCopyOutputStream* sub_stream,
|
|||
|
||||
GzipOutputStream::~GzipOutputStream() {
|
||||
Close();
|
||||
if (input_buffer_ != NULL) {
|
||||
operator delete(input_buffer_);
|
||||
}
|
||||
operator delete(input_buffer_);
|
||||
}
|
||||
|
||||
// private
|
||||
|
|
Loading…
Add table
Reference in a new issue