[cfe-commits] r66819 - /cfe/trunk/lib/Driver/OptTable.cpp
Daniel Dunbar
daniel at zuster.org
Thu Mar 12 11:42:03 PDT 2009
Author: ddunbar
Date: Thu Mar 12 13:42:02 2009
New Revision: 66819
URL: http://llvm.org/viewvc/llvm-project?rev=66819&view=rev
Log:
Driver: Value initialization is nicer than memset.
- Who wouldn't want correctness to hang critically on two easily
ignored characters?
Thanks Doug!
Modified:
cfe/trunk/lib/Driver/OptTable.cpp
Modified: cfe/trunk/lib/Driver/OptTable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/OptTable.cpp?rev=66819&r1=66818&r2=66819&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/OptTable.cpp (original)
+++ cfe/trunk/lib/Driver/OptTable.cpp Thu Mar 12 13:42:02 2009
@@ -44,8 +44,7 @@
return OptionInfos[id - 1];
}
-OptTable::OptTable() : Options(new Option*[numOptions]) {
- memset(Options, 0, sizeof(*Options) * numOptions);
+OptTable::OptTable() : Options(new Option*[numOptions]()) {
}
OptTable::~OptTable() {
More information about the cfe-commits
mailing list