From 600882352ebda4f406912aa89cfb226b700cdbc2 Mon Sep 17 00:00:00 2001 From: David Capello Date: Tue, 22 Apr 2025 22:10:23 -0300 Subject: [PATCH] Avoid warning using std::stable_sort() from gcc/clang --- src/doc/sort_palette.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/doc/sort_palette.cpp b/src/doc/sort_palette.cpp index 7ecc6a552..6891ec82e 100644 --- a/src/doc/sort_palette.cpp +++ b/src/doc/sort_palette.cpp @@ -4,6 +4,12 @@ // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. +#if defined(__GNUC__) || defined(__clang__) + // To avoid deprecated warning on gcc/clang using + // std::get_temporary_buffer() from std::stable_sort() + #pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + #ifdef HAVE_CONFIG_H #include "config.h" #endif