From: Daniel Dunbar Date: Thu, 12 Mar 2009 18:42:02 +0000 (+0000) Subject: Driver: Value initialization is nicer than memset. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9aecfabe3f2821c58421df1ef7dfff7b54f11b74;p=clang Driver: Value initialization is nicer than memset. - Who wouldn't want correctness to hang critically on two easily ignored characters? Thanks Doug! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66819 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/OptTable.cpp b/lib/Driver/OptTable.cpp index d0124057c5..54e5ee1b6a 100644 --- a/lib/Driver/OptTable.cpp +++ b/lib/Driver/OptTable.cpp @@ -44,8 +44,7 @@ static Info &getInfo(unsigned id) { return OptionInfos[id - 1]; } -OptTable::OptTable() : Options(new Option*[numOptions]) { - memset(Options, 0, sizeof(*Options) * numOptions); +OptTable::OptTable() : Options(new Option*[numOptions]()) { } OptTable::~OptTable() {