diff options
author | Hans-Kristian Arntzen <post@arntzen-software.no> | 2019-04-24 09:49:53 +0300 |
---|---|---|
committer | Hans-Kristian Arntzen <post@arntzen-software.no> | 2019-04-24 09:49:53 +0300 |
commit | 9420b7531466fb7b2afd247de87d2ffcfa2c8215 (patch) | |
tree | a3eb4027e86608a280fe978c8428401e55bd1a26 | |
parent | 43bbeacae240fe0b295e6e9d7e99dab4e2c9b4d9 (diff) |
Work around false positive warning on GCC 8.3.
-rw-r--r-- | spirv_cross_containers.hpp | 5 |
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> |