summaryrefslogtreecommitdiff
path: root/src/mbgl/util/thread_local.hpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-12-01 23:08:40 +0100
committerKonstantin Käfer <mail@kkaefer.com>2015-12-03 15:38:36 +0100
commitc279fb171700c464c1cdac5cd2da39f142274d8d (patch)
tree1cd300b174ba13df6869b3c8bd591f07f0d66582 /src/mbgl/util/thread_local.hpp
parent0c351eb523d80fa534bd239b6d5e677e3d5635bb (diff)
downloadqtlocation-mapboxgl-c279fb171700c464c1cdac5cd2da39f142274d8d.tar.gz
[core] throw values, catch references
Diffstat (limited to 'src/mbgl/util/thread_local.hpp')
-rw-r--r--src/mbgl/util/thread_local.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/util/thread_local.hpp b/src/mbgl/util/thread_local.hpp
index c805735cc4..5405037358 100644
--- a/src/mbgl/util/thread_local.hpp
+++ b/src/mbgl/util/thread_local.hpp
@@ -24,13 +24,13 @@ public:
});
if (ret) {
- throw new std::runtime_error("Failed to init local storage key.");
+ throw std::runtime_error("Failed to init local storage key.");
}
}
inline ~ThreadLocal() {
if (pthread_key_delete(key)) {
- throw new std::runtime_error("Failed to delete local storage key.");
+ throw std::runtime_error("Failed to delete local storage key.");
}
}
@@ -45,7 +45,7 @@ public:
inline void set(T* ptr) {
if (pthread_setspecific(key, ptr)) {
- throw new std::runtime_error("Failed to set local storage.");
+ throw std::runtime_error("Failed to set local storage.");
}
}