THRIFT-4762: Applied some C++11 refactorings to the runtime library and compiler (#1719)
* make use of C++11 override keyword
* added const specifier to TTransport::getOrigin()
* added more const correctness to the compiler
* make use of auto keyword
* replaced usage of NULL with nullptr
* make use of explicitly-defaulted function definition
* extended changelog
diff --git a/test/cpp/src/TestClient.cpp b/test/cpp/src/TestClient.cpp
index 89f3fd1..2a06578 100644
--- a/test/cpp/src/TestClient.cpp
+++ b/test/cpp/src/TestClient.cpp
@@ -65,7 +65,7 @@
int64_t ret;
struct timeval tv;
- THRIFT_GETTIMEOFDAY(&tv, NULL);
+ THRIFT_GETTIMEOFDAY(&tv, nullptr);
ret = tv.tv_sec;
ret = ret * 1000 * 1000 + tv.tv_usec;
return ret;
@@ -942,11 +942,11 @@
if (it1 == whoa.end()) {
failed = true;
} else {
- map<Numberz::type, Insanity>::const_iterator it12 = it1->second.find(Numberz::TWO);
+ auto it12 = it1->second.find(Numberz::TWO);
if (it12 == it1->second.end() || it12->second != insane) {
failed = true;
}
- map<Numberz::type, Insanity>::const_iterator it13 = it1->second.find(Numberz::THREE);
+ auto it13 = it1->second.find(Numberz::THREE);
if (it13 == it1->second.end() || it13->second != insane) {
failed = true;
}
@@ -955,7 +955,7 @@
if (it2 == whoa.end()) {
failed = true;
} else {
- map<Numberz::type, Insanity>::const_iterator it26 = it2->second.find(Numberz::SIX);
+ auto it26 = it2->second.find(Numberz::SIX);
if (it26 == it2->second.end() || it26->second != Insanity()) {
failed = true;
}