mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge pull request #23736 from seanm:c++11-simplifications
Removed all pre-C++11 code, workarounds, and branches #23736 This removes a bunch of pre-C++11 workrarounds that are no longer necessary as C++11 is now required. It is a nice clean up and simplification. * No longer unconditionally #include <array> in cvdef.h, include explicitly where needed * Removed deprecated CV_NODISCARD, already unused in the codebase * Removed some pre-C++11 workarounds, and simplified some backwards compat defines * Removed CV_CXX_STD_ARRAY * Removed CV_CXX_MOVE_SEMANTICS and CV_CXX_MOVE * Removed all tests of CV_CXX11, now assume it's always true. This allowed removing a lot of dead code. * Updated some documentation consequently. * Removed all tests of CV_CXX11, now assume it's always true * Fixed links. --------- Co-authored-by: Maksim Shabunin <maksim.shabunin@gmail.com> Co-authored-by: Alexander Smorkalov <alexander.smorkalov@xperience.ai>
This commit is contained in:
@@ -210,15 +210,8 @@ struct ImageCodecInitializer
|
||||
static
|
||||
ImageCodecInitializer& getCodecs()
|
||||
{
|
||||
#ifdef CV_CXX11
|
||||
static ImageCodecInitializer g_codecs;
|
||||
return g_codecs;
|
||||
#else
|
||||
// C++98 doesn't guarantee correctness of multi-threaded initialization of static global variables
|
||||
// (memory leak here is not critical, use C++11 to avoid that)
|
||||
static ImageCodecInitializer* g_codecs = new ImageCodecInitializer();
|
||||
return *g_codecs;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user