Changeset 105873 in vbox for trunk/src/VBox/Main/src-all
- Timestamp:
- Aug 27, 2024 2:52:54 PM (8 months ago)
- svn:sync-xref-src-repo-rev:
- 164593
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-all/PlatformPropertiesImpl.cpp
r105872 r105873 45 45 46 46 47 // defines48 /////////////////////////////////////////////////////////////////////////////49 50 /** @def MY_VECTOR_ASSIGN_ARRAY51 * Safe way to copy an array (static + const) into a vector w/ minimal typing.52 *53 * @param a_rVector The destination vector reference.54 * @param a_aSrcArray The source array to assign to the vector.55 */56 #if RT_GNUC_PREREQ(13, 0) && !RT_GNUC_PREREQ(14, 0) && defined(VBOX_WITH_GCC_SANITIZER)57 /* Workaround for g++ 13.2 incorrectly failing on arrays with a single entry in ASAN builds.58 This is restricted to [13.0, 14.0), assuming the issue was introduced in the 13 cycle59 and will be fixed by the time 14 is done. If 14 doesn't fix it, extend the range60 version by version till it is fixed. */61 # define MY_VECTOR_ASSIGN_ARRAY(a_rVector, a_aSrcArray) do { \62 _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wstringop-overread\""); \63 (a_rVector).assign(&a_aSrcArray[0], &a_aSrcArray[RT_ELEMENTS(a_aSrcArray)]); \64 _Pragma("GCC diagnostic pop"); \65 } while (0)66 #else67 # define MY_VECTOR_ASSIGN_ARRAY(a_rVector, a_aSrcArray) do { \68 (a_rVector).assign(&a_aSrcArray[0], &a_aSrcArray[RT_ELEMENTS(a_aSrcArray)]); \69 } while (0)70 #endif71 72 73 47 /* 74 48 * PlatformProperties implementation. … … 877 851 # endif 878 852 }; 879 MY_VECTOR_ASSIGN_ARRAY(vecSupportedGraphicsFeatures, s_aGraphicsFeatures);853 RT_CPP_VECTOR_ASSIGN_ARRAY(vecSupportedGraphicsFeatures, s_aGraphicsFeatures); 880 854 break; 881 855 } … … 889 863 GraphicsFeature_None 890 864 }; 891 MY_VECTOR_ASSIGN_ARRAY(vecSupportedGraphicsFeatures, s_aGraphicsFeatures);865 RT_CPP_VECTOR_ASSIGN_ARRAY(vecSupportedGraphicsFeatures, s_aGraphicsFeatures); 892 866 break; 893 867 }
Note:
See TracChangeset
for help on using the changeset viewer.