[llvm] r175595 - Rename llvm::Optional<T>::Reset to 'reset' as per LLVM naming conventions.
David Blaikie
dblaikie at gmail.com
Tue Feb 19 22:25:36 PST 2013
Author: dblaikie
Date: Wed Feb 20 00:25:36 2013
New Revision: 175595
URL: http://llvm.org/viewvc/llvm-project?rev=175595&view=rev
Log:
Rename llvm::Optional<T>::Reset to 'reset' as per LLVM naming conventions.
Code review feedback on r175580 from Jordan Rose.
Modified:
llvm/trunk/include/llvm/ADT/Optional.h
llvm/trunk/unittests/ADT/OptionalTest.cpp
Modified: llvm/trunk/include/llvm/ADT/Optional.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Optional.h?rev=175595&r1=175594&r2=175595&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Optional.h (original)
+++ llvm/trunk/include/llvm/ADT/Optional.h Wed Feb 20 00:25:36 2013
@@ -62,13 +62,13 @@ public:
Optional &operator=(const Optional &O) {
if (!O)
- Reset();
+ reset();
else
*this = *O;
return *this;
}
- void Reset() {
+ void reset() {
if (hasVal) {
(*this)->~T();
hasVal = false;
@@ -76,7 +76,7 @@ public:
}
~Optional() {
- Reset();
+ reset();
}
const T* getPointer() const { assert(hasVal); return reinterpret_cast<const T*>(storage.buffer); }
Modified: llvm/trunk/unittests/ADT/OptionalTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/OptionalTest.cpp?rev=175595&r1=175594&r2=175595&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/OptionalTest.cpp (original)
+++ llvm/trunk/unittests/ADT/OptionalTest.cpp Wed Feb 20 00:25:36 2013
@@ -56,7 +56,7 @@ TEST_F(OptionalTest, ResetTest) {
EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments);
EXPECT_EQ(1u, NonDefaultConstructible::Destructions);
NonDefaultConstructible::ResetCounts();
- O.Reset();
+ O.reset();
EXPECT_EQ(0u, NonDefaultConstructible::CopyConstructions);
EXPECT_EQ(0u, NonDefaultConstructible::CopyAssignments);
EXPECT_EQ(1u, NonDefaultConstructible::Destructions);
More information about the llvm-commits
mailing list