aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PerLine.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2016-01-10 10:49:02 +1100
committerNeil <nyamatongwe@gmail.com>2016-01-10 10:49:02 +1100
commit80c43646ce8cdd8b5ee434af66977c410e271b8b (patch)
tree195eb2cf3853d99c35907148cb5c77cca2d02758 /src/PerLine.cxx
parent4002e7bd46331b23984a3bf4f436534abd11dc22 (diff)
downloadscintilla-mirror-80c43646ce8cdd8b5ee434af66977c410e271b8b.tar.gz
Use value initialization in preference to memset as simpler and more robust.
Diffstat (limited to 'src/PerLine.cxx')
-rw-r--r--src/PerLine.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/PerLine.cxx b/src/PerLine.cxx
index 7d574177d..6a3dd33dd 100644
--- a/src/PerLine.cxx
+++ b/src/PerLine.cxx
@@ -410,8 +410,7 @@ const unsigned char *LineAnnotation::Styles(int line) const {
static char *AllocateAnnotation(int length, int style) {
size_t len = sizeof(AnnotationHeader) + length + ((style == IndividualStyles) ? length : 0);
- char *ret = new char[len];
- memset(ret, 0, len);
+ char *ret = new char[len]();
return ret;
}