diff --git a/platform/android/src/style/layers/unknown_layer.cpp b/platform/android/src/style/layers/unknown_layer.cpp index 9ec963a41..8ffda82bf 100644 --- a/platform/android/src/style/layers/unknown_layer.cpp +++ b/platform/android/src/style/layers/unknown_layer.cpp @@ -6,7 +6,7 @@ namespace { // Dummy initializer (We don't support initializing this from the JVM) std::unique_ptr init(jni::JNIEnv&) { - throw new std::runtime_error("UnknownLayer should not be initialized from the JVM"); + throw std::runtime_error("UnknownLayer should not be initialized from the JVM"); } } // namespace diff --git a/platform/android/src/style/sources/unknown_source.cpp b/platform/android/src/style/sources/unknown_source.cpp index c1b1cc8c0..86736597c 100644 --- a/platform/android/src/style/sources/unknown_source.cpp +++ b/platform/android/src/style/sources/unknown_source.cpp @@ -4,7 +4,7 @@ namespace { // Dummy initializer (We don't support initializing this from the JVM) std::unique_ptr init(jni::JNIEnv&) { - throw new std::runtime_error("UnknownSource should not be initialized from the JVM"); + throw std::runtime_error("UnknownSource should not be initialized from the JVM"); } } // namespace diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp index 1a5a6a228..3ab1260d2 100644 --- a/src/mbgl/gl/context.cpp +++ b/src/mbgl/gl/context.cpp @@ -341,7 +341,7 @@ Framebuffer Context::createFramebuffer(const Renderbuffer& color, const Renderbuffer& depthStencil) { if (color.size != depthStencil.size) { - throw new std::runtime_error("Renderbuffer size mismatch"); + throw std::runtime_error("Renderbuffer size mismatch"); } auto fbo = createFramebuffer(); bindFramebuffer = fbo; @@ -365,7 +365,7 @@ Framebuffer Context::createFramebuffer(const Texture& color, const Renderbuffer& depthStencil) { if (color.size != depthStencil.size) { - throw new std::runtime_error("Renderbuffer size mismatch"); + throw std::runtime_error("Renderbuffer size mismatch"); } auto fbo = createFramebuffer(); bindFramebuffer = fbo;