diff options
author | nyamatongwe <unknown> | 2013-05-05 11:52:33 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2013-05-05 11:52:33 +1000 |
commit | d7acb6eca77b3a40f2cfcaf692de05dd532f4bf7 (patch) | |
tree | beb54c0553eb2e7b18b4165ac0d2d67f72ec0823 /src/Editor.cxx | |
parent | 6de91394f22148840aa1c4daa3c297d1e09aa0c2 (diff) | |
download | scintilla-mirror-d7acb6eca77b3a40f2cfcaf692de05dd532f4bf7.tar.gz |
Since new throws an exception on failure, remove testing of result.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 430469d5f..63deb701a 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -9069,9 +9069,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_CREATEDOCUMENT: { Document *doc = new Document(); - if (doc) { - doc->AddRef(); - } + doc->AddRef(); return reinterpret_cast<sptr_t>(doc); } @@ -9085,11 +9083,9 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_CREATELOADER: { Document *doc = new Document(); - if (doc) { - doc->AddRef(); - doc->Allocate(wParam); - doc->SetUndoCollection(false); - } + doc->AddRef(); + doc->Allocate(wParam); + doc->SetUndoCollection(false); return reinterpret_cast<sptr_t>(static_cast<ILoader *>(doc)); } |