diff options
| author | nyamatongwe <unknown> | 2009-07-12 23:31:36 +0000 |
|---|---|---|
| committer | nyamatongwe <unknown> | 2009-07-12 23:31:36 +0000 |
| commit | 290b272cdaf0c0f04d3536080f3918893e489094 (patch) | |
| tree | c8fa0033ee165c14327614447d92ae00bcd79bfa /src/Editor.h | |
| parent | 26c0795acabf1964ac9ba6dc7e212d58d9714c83 (diff) | |
| download | scintilla-mirror-290b272cdaf0c0f04d3536080f3918893e489094.tar.gz | |
Since now using exceptions, don't check result from new.
Diffstat (limited to 'src/Editor.h')
| -rw-r--r-- | src/Editor.h | 11 |
1 files changed, 4 insertions, 7 deletions
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_; |
