aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-02-20 06:25:36 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-02-20 06:25:36 +0000
commit4318fc5e1e44f355ae117dcac385f1718d971e90 (patch)
tree53a20b6aac65f693a9218367060c7a667b689e69
parent65692c809efa46337bf80f12b1795e785a6e7207 (diff)
downloadexternal_llvm-4318fc5e1e44f355ae117dcac385f1718d971e90.zip
external_llvm-4318fc5e1e44f355ae117dcac385f1718d971e90.tar.gz
external_llvm-4318fc5e1e44f355ae117dcac385f1718d971e90.tar.bz2
Rename llvm::Optional<T>::Reset to 'reset' as per LLVM naming conventions.
Code review feedback on r175580 from Jordan Rose. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175595 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/Optional.h6
-rw-r--r--unittests/ADT/OptionalTest.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/ADT/Optional.h b/include/llvm/ADT/Optional.h
index cc6065c..e55ad79 100644
--- a/include/llvm/ADT/Optional.h
+++ b/include/llvm/ADT/Optional.h
@@ -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); }
diff --git a/unittests/ADT/OptionalTest.cpp b/unittests/ADT/OptionalTest.cpp
index 8bdea45..6fd8bba 100644
--- a/unittests/ADT/OptionalTest.cpp
+++ b/unittests/ADT/OptionalTest.cpp
@@ -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);