Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Kristian Arntzen <post@arntzen-software.no>2019-04-24 09:49:53 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2019-04-24 09:49:53 +0300
commit9420b7531466fb7b2afd247de87d2ffcfa2c8215 (patch)
treea3eb4027e86608a280fe978c8428401e55bd1a26
parent43bbeacae240fe0b295e6e9d7e99dab4e2c9b4d9 (diff)
Work around false positive warning on GCC 8.3.
-rw-r--r--spirv_cross_containers.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/spirv_cross_containers.hpp b/spirv_cross_containers.hpp
index 11cb3719..393f4614 100644
--- a/spirv_cross_containers.hpp
+++ b/spirv_cross_containers.hpp
@@ -297,7 +297,10 @@ public:
void pop_back()
{
- resize(this->buffer_size - 1);
+ // Work around false positive warning on GCC 8.3.
+ // Calling pop_back on empty vector is undefined.
+ if (!this->empty())
+ resize(this->buffer_size - 1);
}
template <typename... Ts>