From 290b272cdaf0c0f04d3536080f3918893e489094 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 12 Jul 2009 23:31:36 +0000 Subject: Since now using exceptions, don't check result from new. --- src/Editor.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/Editor.h') diff --git a/src/Editor.h b/src/Editor.h index de7aac98f..79746477e 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -78,14 +78,11 @@ public: } void Copy(const char *s_, int len_, int codePage_, int characterSet_, bool rectangular_, bool lineCopy_) { delete []s; + s = 0; s = new char[len_]; - if (s) { - len = len_; - for (int i = 0; i < len_; i++) { - s[i] = s_[i]; - } - } else { - len = 0; + len = len_; + for (int i = 0; i < len_; i++) { + s[i] = s_[i]; } codePage = codePage_; characterSet = characterSet_; -- cgit v1.2.3