Remove wxUSE_STD_STRING and wxUSE_STD_CONTAINERS_COMPATIBLY
Assume they are always 1 now, there is no good reason to ever set them to 0 any more. Note that we still keep wxUSE_STD_IOSTREAM for now, but we can drop wxUSE_STD_DEFAULT as it's not worth having it just for this single option (previously it was used as the default value for 3 of them).
This commit is contained in:
parent
2c0c727f49
commit
be7860c766
29 changed files with 134 additions and 579 deletions
|
|
@ -187,7 +187,6 @@ if(NOT wxBUILD_DEBUG_LEVEL STREQUAL "Default")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Constants for setup.h creation
|
# Constants for setup.h creation
|
||||||
set(wxUSE_STD_DEFAULT ON)
|
|
||||||
if(NOT wxUSE_EXPAT)
|
if(NOT wxUSE_EXPAT)
|
||||||
set(wxUSE_XRC OFF)
|
set(wxUSE_XRC OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@ mark_as_advanced(wxBUILD_PIC)
|
||||||
wx_option(wxUSE_NO_RTTI "disable RTTI support" OFF)
|
wx_option(wxUSE_NO_RTTI "disable RTTI support" OFF)
|
||||||
|
|
||||||
# STL options
|
# STL options
|
||||||
|
wx_option(wxUSE_STD_IOSTREAM "use standard C++ streams" ON)
|
||||||
wx_option(wxUSE_STL "use standard C++ classes for everything" OFF)
|
wx_option(wxUSE_STL "use standard C++ classes for everything" OFF)
|
||||||
set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} wxUSE_STL "use C++ STL classes")
|
set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} wxUSE_STL "use C++ STL classes")
|
||||||
wx_dependent_option(wxUSE_STD_CONTAINERS "use standard C++ container classes" ON "wxUSE_STL" OFF)
|
wx_dependent_option(wxUSE_STD_CONTAINERS "use standard C++ container classes" ON "wxUSE_STL" OFF)
|
||||||
|
|
|
||||||
|
|
@ -171,15 +171,9 @@
|
||||||
|
|
||||||
#cmakedefine01 wxUSE_STL
|
#cmakedefine01 wxUSE_STL
|
||||||
|
|
||||||
#cmakedefine01 wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
#define wxUSE_STD_CONTAINERS_COMPATIBLY wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
#cmakedefine01 wxUSE_STD_CONTAINERS
|
#cmakedefine01 wxUSE_STD_CONTAINERS
|
||||||
|
|
||||||
#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT
|
#cmakedefine01 wxUSE_STD_IOSTREAM
|
||||||
|
|
||||||
#define wxUSE_STD_STRING wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
|
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
|
||||||
|
|
||||||
|
|
|
||||||
84
configure
vendored
84
configure
vendored
|
|
@ -1122,9 +1122,7 @@ enable_cxx11
|
||||||
with_cxx
|
with_cxx
|
||||||
enable_stl
|
enable_stl
|
||||||
enable_std_containers
|
enable_std_containers
|
||||||
enable_std_containers_compat
|
|
||||||
enable_std_iostreams
|
enable_std_iostreams
|
||||||
enable_std_string
|
|
||||||
enable_std_string_conv_in_wxstring
|
enable_std_string_conv_in_wxstring
|
||||||
enable_unsafe_conv_in_wxstring
|
enable_unsafe_conv_in_wxstring
|
||||||
enable_utf8
|
enable_utf8
|
||||||
|
|
@ -2090,9 +2088,7 @@ Optional Features:
|
||||||
--enable-cxx11 obsolete option doing nothing
|
--enable-cxx11 obsolete option doing nothing
|
||||||
--enable-stl use standard C++ classes for everything
|
--enable-stl use standard C++ classes for everything
|
||||||
--enable-std_containers use standard C++ container classes
|
--enable-std_containers use standard C++ container classes
|
||||||
--enable-std_containers_compat use standard C++ container classes when it can be done compatible
|
--disable-std_iostreams disable use of standard C++ stream classes
|
||||||
--enable-std_iostreams use standard C++ stream classes
|
|
||||||
--enable-std_string use standard C++ string classes
|
|
||||||
--enable-std_string_conv_in_wxstring provide implicit conversion to std::string in wxString
|
--enable-std_string_conv_in_wxstring provide implicit conversion to std::string in wxString
|
||||||
--disable-unsafe_conv_in_wxstring disable unsafe implicit conversions in wxString
|
--disable-unsafe_conv_in_wxstring disable unsafe implicit conversions in wxString
|
||||||
--enable-utf8 use UTF-8 representation for strings (Unix only)
|
--enable-utf8 use UTF-8 representation for strings (Unix only)
|
||||||
|
|
@ -3849,8 +3845,6 @@ SAMPLES_RPATH_FLAG=
|
||||||
DYLIB_RPATH_INSTALL=
|
DYLIB_RPATH_INSTALL=
|
||||||
DYLIB_RPATH_POSTLINK=
|
DYLIB_RPATH_POSTLINK=
|
||||||
|
|
||||||
DEFAULT_STD_FLAG=yes
|
|
||||||
|
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
*-hp-hpux* )
|
*-hp-hpux* )
|
||||||
USE_HPUX=1
|
USE_HPUX=1
|
||||||
|
|
@ -4045,9 +4039,6 @@ esac
|
||||||
DEFAULT_wxUSE_ALL_FEATURES=yes
|
DEFAULT_wxUSE_ALL_FEATURES=yes
|
||||||
|
|
||||||
DEFAULT_wxUSE_STD_CONTAINERS=no
|
DEFAULT_wxUSE_STD_CONTAINERS=no
|
||||||
DEFAULT_wxUSE_STD_CONTAINERS_COMPATIBLY=$DEFAULT_STD_FLAG
|
|
||||||
DEFAULT_wxUSE_STD_IOSTREAM=$DEFAULT_STD_FLAG
|
|
||||||
DEFAULT_wxUSE_STD_STRING=$DEFAULT_STD_FLAG
|
|
||||||
|
|
||||||
DEFAULT_wxUSE_DMALLOC=no
|
DEFAULT_wxUSE_DMALLOC=no
|
||||||
DEFAULT_wxUSE_LIBCURL=auto
|
DEFAULT_wxUSE_LIBCURL=auto
|
||||||
|
|
@ -5662,9 +5653,6 @@ fi
|
||||||
|
|
||||||
if test "$wxUSE_STL" = "yes"; then
|
if test "$wxUSE_STL" = "yes"; then
|
||||||
DEFAULT_wxUSE_STD_CONTAINERS=yes
|
DEFAULT_wxUSE_STD_CONTAINERS=yes
|
||||||
DEFAULT_wxUSE_STD_CONTAINERS_COMPATIBLY=yes
|
|
||||||
DEFAULT_wxUSE_STD_IOSTREAM=yes
|
|
||||||
DEFAULT_wxUSE_STD_STRING=yes
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
enablestring=
|
enablestring=
|
||||||
|
|
@ -5696,36 +5684,7 @@ fi
|
||||||
eval "$wx_cv_use_std_containers"
|
eval "$wx_cv_use_std_containers"
|
||||||
|
|
||||||
|
|
||||||
enablestring=
|
enablestring=disable
|
||||||
defaultval=
|
|
||||||
if test -z "$defaultval"; then
|
|
||||||
if test x"$enablestring" = xdisable; then
|
|
||||||
defaultval=yes
|
|
||||||
else
|
|
||||||
defaultval=no
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check whether --enable-std_containers_compat was given.
|
|
||||||
if test "${enable_std_containers_compat+set}" = set; then :
|
|
||||||
enableval=$enable_std_containers_compat;
|
|
||||||
if test "$enableval" = yes; then
|
|
||||||
wx_cv_use_std_containers_compat='wxUSE_STD_CONTAINERS_COMPATIBLY=yes'
|
|
||||||
else
|
|
||||||
wx_cv_use_std_containers_compat='wxUSE_STD_CONTAINERS_COMPATIBLY=no'
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
wx_cv_use_std_containers_compat='wxUSE_STD_CONTAINERS_COMPATIBLY=${'DEFAULT_wxUSE_STD_CONTAINERS_COMPATIBLY":-$defaultval}"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
eval "$wx_cv_use_std_containers_compat"
|
|
||||||
|
|
||||||
|
|
||||||
enablestring=
|
|
||||||
defaultval=
|
defaultval=
|
||||||
if test -z "$defaultval"; then
|
if test -z "$defaultval"; then
|
||||||
if test x"$enablestring" = xdisable; then
|
if test x"$enablestring" = xdisable; then
|
||||||
|
|
@ -5754,35 +5713,6 @@ fi
|
||||||
eval "$wx_cv_use_std_iostreams"
|
eval "$wx_cv_use_std_iostreams"
|
||||||
|
|
||||||
|
|
||||||
enablestring=
|
|
||||||
defaultval=
|
|
||||||
if test -z "$defaultval"; then
|
|
||||||
if test x"$enablestring" = xdisable; then
|
|
||||||
defaultval=yes
|
|
||||||
else
|
|
||||||
defaultval=no
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check whether --enable-std_string was given.
|
|
||||||
if test "${enable_std_string+set}" = set; then :
|
|
||||||
enableval=$enable_std_string;
|
|
||||||
if test "$enableval" = yes; then
|
|
||||||
wx_cv_use_std_string='wxUSE_STD_STRING=yes'
|
|
||||||
else
|
|
||||||
wx_cv_use_std_string='wxUSE_STD_STRING=no'
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
wx_cv_use_std_string='wxUSE_STD_STRING=${'DEFAULT_wxUSE_STD_STRING":-$defaultval}"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
eval "$wx_cv_use_std_string"
|
|
||||||
|
|
||||||
|
|
||||||
enablestring=
|
enablestring=
|
||||||
defaultval=
|
defaultval=
|
||||||
if test -z "$defaultval"; then
|
if test -z "$defaultval"; then
|
||||||
|
|
@ -37599,21 +37529,11 @@ if test "$wxUSE_STD_CONTAINERS" = "yes"; then
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$wxUSE_STD_CONTAINERS_COMPATIBLY" = "yes"; then
|
|
||||||
$as_echo "#define wxUSE_STD_CONTAINERS_COMPATIBLY 1" >>confdefs.h
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$wxUSE_STD_IOSTREAM" = "yes"; then
|
if test "$wxUSE_STD_IOSTREAM" = "yes"; then
|
||||||
$as_echo "#define wxUSE_STD_IOSTREAM 1" >>confdefs.h
|
$as_echo "#define wxUSE_STD_IOSTREAM 1" >>confdefs.h
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$wxUSE_STD_STRING" = "yes"; then
|
|
||||||
$as_echo "#define wxUSE_STD_STRING 1" >>confdefs.h
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$wxUSE_STD_STRING_CONV_IN_WXSTRING" = "yes"; then
|
if test "$wxUSE_STD_STRING_CONV_IN_WXSTRING" = "yes"; then
|
||||||
$as_echo "#define wxUSE_STD_STRING_CONV_IN_WXSTRING 1" >>confdefs.h
|
$as_echo "#define wxUSE_STD_STRING_CONV_IN_WXSTRING 1" >>confdefs.h
|
||||||
|
|
||||||
|
|
|
||||||
20
configure.in
20
configure.in
|
|
@ -140,8 +140,6 @@ SAMPLES_RPATH_FLAG=
|
||||||
DYLIB_RPATH_INSTALL=
|
DYLIB_RPATH_INSTALL=
|
||||||
DYLIB_RPATH_POSTLINK=
|
DYLIB_RPATH_POSTLINK=
|
||||||
|
|
||||||
DEFAULT_STD_FLAG=yes
|
|
||||||
|
|
||||||
dnl to support a new system, you need to add its canonical name (as determined
|
dnl to support a new system, you need to add its canonical name (as determined
|
||||||
dnl by config.sub or specified by the configure command line) to this "case"
|
dnl by config.sub or specified by the configure command line) to this "case"
|
||||||
dnl and also define the shared library flags below - search for
|
dnl and also define the shared library flags below - search for
|
||||||
|
|
@ -327,9 +325,6 @@ dnl default)
|
||||||
DEFAULT_wxUSE_ALL_FEATURES=yes
|
DEFAULT_wxUSE_ALL_FEATURES=yes
|
||||||
|
|
||||||
DEFAULT_wxUSE_STD_CONTAINERS=no
|
DEFAULT_wxUSE_STD_CONTAINERS=no
|
||||||
DEFAULT_wxUSE_STD_CONTAINERS_COMPATIBLY=$DEFAULT_STD_FLAG
|
|
||||||
DEFAULT_wxUSE_STD_IOSTREAM=$DEFAULT_STD_FLAG
|
|
||||||
DEFAULT_wxUSE_STD_STRING=$DEFAULT_STD_FLAG
|
|
||||||
|
|
||||||
dnl libraries disabled by default or requiring some special handling
|
dnl libraries disabled by default or requiring some special handling
|
||||||
DEFAULT_wxUSE_DMALLOC=no
|
DEFAULT_wxUSE_DMALLOC=no
|
||||||
|
|
@ -665,14 +660,9 @@ AC_ARG_WITH(cxx, [ --with-cxx=11|14|17|20 use the given C++ dialect]
|
||||||
WX_ARG_ENABLE(stl, [ --enable-stl use standard C++ classes for everything], wxUSE_STL)
|
WX_ARG_ENABLE(stl, [ --enable-stl use standard C++ classes for everything], wxUSE_STL)
|
||||||
if test "$wxUSE_STL" = "yes"; then
|
if test "$wxUSE_STL" = "yes"; then
|
||||||
DEFAULT_wxUSE_STD_CONTAINERS=yes
|
DEFAULT_wxUSE_STD_CONTAINERS=yes
|
||||||
DEFAULT_wxUSE_STD_CONTAINERS_COMPATIBLY=yes
|
|
||||||
DEFAULT_wxUSE_STD_IOSTREAM=yes
|
|
||||||
DEFAULT_wxUSE_STD_STRING=yes
|
|
||||||
fi
|
fi
|
||||||
WX_ARG_ENABLE(std_containers,[ --enable-std_containers use standard C++ container classes], wxUSE_STD_CONTAINERS)
|
WX_ARG_ENABLE(std_containers,[ --enable-std_containers use standard C++ container classes], wxUSE_STD_CONTAINERS)
|
||||||
WX_ARG_ENABLE(std_containers_compat, [ --enable-std_containers_compat use standard C++ container classes when it can be done compatible], wxUSE_STD_CONTAINERS_COMPATIBLY)
|
WX_ARG_DISABLE(std_iostreams,[ --disable-std_iostreams disable use of standard C++ stream classes], wxUSE_STD_IOSTREAM)
|
||||||
WX_ARG_ENABLE(std_iostreams, [ --enable-std_iostreams use standard C++ stream classes], wxUSE_STD_IOSTREAM)
|
|
||||||
WX_ARG_ENABLE(std_string, [ --enable-std_string use standard C++ string classes], wxUSE_STD_STRING)
|
|
||||||
WX_ARG_ENABLE(std_string_conv_in_wxstring, [ --enable-std_string_conv_in_wxstring provide implicit conversion to std::string in wxString], wxUSE_STD_STRING_CONV_IN_WXSTRING)
|
WX_ARG_ENABLE(std_string_conv_in_wxstring, [ --enable-std_string_conv_in_wxstring provide implicit conversion to std::string in wxString], wxUSE_STD_STRING_CONV_IN_WXSTRING)
|
||||||
WX_ARG_DISABLE(unsafe_conv_in_wxstring, [ --disable-unsafe_conv_in_wxstring disable unsafe implicit conversions in wxString], wxUSE_UNSAFE_WXSTRING_CONV)
|
WX_ARG_DISABLE(unsafe_conv_in_wxstring, [ --disable-unsafe_conv_in_wxstring disable unsafe implicit conversions in wxString], wxUSE_UNSAFE_WXSTRING_CONV)
|
||||||
WX_ARG_ENABLE_PARAM(utf8, [ --enable-utf8 use UTF-8 representation for strings (Unix only)], wxUSE_UNICODE_UTF8)
|
WX_ARG_ENABLE_PARAM(utf8, [ --enable-utf8 use UTF-8 representation for strings (Unix only)], wxUSE_UNICODE_UTF8)
|
||||||
|
|
@ -5430,18 +5420,10 @@ if test "$wxUSE_STD_CONTAINERS" = "yes"; then
|
||||||
AC_DEFINE(wxUSE_STD_CONTAINERS)
|
AC_DEFINE(wxUSE_STD_CONTAINERS)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$wxUSE_STD_CONTAINERS_COMPATIBLY" = "yes"; then
|
|
||||||
AC_DEFINE(wxUSE_STD_CONTAINERS_COMPATIBLY)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$wxUSE_STD_IOSTREAM" = "yes"; then
|
if test "$wxUSE_STD_IOSTREAM" = "yes"; then
|
||||||
AC_DEFINE(wxUSE_STD_IOSTREAM)
|
AC_DEFINE(wxUSE_STD_IOSTREAM)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$wxUSE_STD_STRING" = "yes"; then
|
|
||||||
AC_DEFINE(wxUSE_STD_STRING)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$wxUSE_STD_STRING_CONV_IN_WXSTRING" = "yes"; then
|
if test "$wxUSE_STD_STRING_CONV_IN_WXSTRING" = "yes"; then
|
||||||
AC_DEFINE(wxUSE_STD_STRING_CONV_IN_WXSTRING)
|
AC_DEFINE(wxUSE_STD_STRING_CONV_IN_WXSTRING)
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -29,11 +29,6 @@ library:
|
||||||
@beginDefList
|
@beginDefList
|
||||||
@itemdef{wxUSE_STL, Container classes and wxString are implemented using
|
@itemdef{wxUSE_STL, Container classes and wxString are implemented using
|
||||||
standard classes and provide the same standard API.}
|
standard classes and provide the same standard API.}
|
||||||
@itemdef{wxUSE_STD_STRING, wxString is implemented using std::[w]string and can
|
|
||||||
be constructed from it (but provides wxWidgets-compatible API, in
|
|
||||||
particular is implicitly convertible to @c char* and not std::[w]string).}
|
|
||||||
@itemdef{wxUSE_STD_IOSTREAM, Standard C++ classes are used instead of or in
|
|
||||||
addition to wx stream classes.}
|
|
||||||
@itemdef{wxUSE_UNICODE, Always defined as 1 in wxWidgets 3.3 and later, only
|
@itemdef{wxUSE_UNICODE, Always defined as 1 in wxWidgets 3.3 and later, only
|
||||||
exists for compatibility.}
|
exists for compatibility.}
|
||||||
@itemdef{wxUSE_UNICODE_WCHAR, wxString uses wchar_t buffer for internal storage
|
@itemdef{wxUSE_UNICODE_WCHAR, wxString uses wchar_t buffer for internal storage
|
||||||
|
|
|
||||||
|
|
@ -283,35 +283,11 @@
|
||||||
//
|
//
|
||||||
// Default is 0
|
// Default is 0
|
||||||
//
|
//
|
||||||
// Recommended setting: 0 as the options below already provide a relatively
|
// Recommended setting: 1 for new code bases and if compatibility with the
|
||||||
// good level of interoperability and changing this option arguably isn't worth
|
// official build of the library is not important, 0 otherwise.
|
||||||
// diverging from the official builds of the library.
|
|
||||||
#define wxUSE_STL 0
|
#define wxUSE_STL 0
|
||||||
|
|
||||||
// This is not a real option but is used as the default value for
|
// Use standard C++ containers to implement all wx container classes.
|
||||||
// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS_COMPATIBLY.
|
|
||||||
//
|
|
||||||
// Set it to 0 if you want to disable the use of all standard classes
|
|
||||||
// completely for some reason.
|
|
||||||
#define wxUSE_STD_DEFAULT 1
|
|
||||||
|
|
||||||
// Use standard C++ containers where it can be done without breaking backwards
|
|
||||||
// compatibility.
|
|
||||||
//
|
|
||||||
// This provides better interoperability with the standard library, e.g. with
|
|
||||||
// this option on it's possible to insert std::vector<> into many wxWidgets
|
|
||||||
// containers directly.
|
|
||||||
//
|
|
||||||
// Default is 1.
|
|
||||||
//
|
|
||||||
// Recommended setting is 1 unless you want to avoid all dependencies on the
|
|
||||||
// standard library.
|
|
||||||
#define wxUSE_STD_CONTAINERS_COMPATIBLY wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<>
|
|
||||||
// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but
|
|
||||||
// usually more limited) implementations are used which allows to avoid the
|
|
||||||
// dependency on the C++ run-time library.
|
|
||||||
//
|
//
|
||||||
// Default is 0 for compatibility reasons.
|
// Default is 0 for compatibility reasons.
|
||||||
//
|
//
|
||||||
|
|
@ -320,30 +296,15 @@
|
||||||
#define wxUSE_STD_CONTAINERS 0
|
#define wxUSE_STD_CONTAINERS 0
|
||||||
|
|
||||||
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
||||||
// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the
|
// disabled, wx streams are used instead.
|
||||||
// standard streams library.
|
|
||||||
//
|
//
|
||||||
// Notice that enabling this does not replace wx streams with std streams
|
// Notice that enabling this does not replace wx streams with std streams
|
||||||
// everywhere, in a lot of places wx streams are used no matter what.
|
// everywhere, in a lot of places wx streams are used no matter what.
|
||||||
//
|
//
|
||||||
// Default is 1 if compiler supports it.
|
// Default is 1.
|
||||||
//
|
//
|
||||||
// Recommended setting: 1 if you use the standard streams anyhow and so
|
// Recommended setting: 1.
|
||||||
// dependency on the standard streams library is not a
|
#define wxUSE_STD_IOSTREAM 1
|
||||||
// problem
|
|
||||||
#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
// Enable minimal interoperability with the standard C++ string class if 1.
|
|
||||||
// "Minimal" means that wxString can be constructed from std::string or
|
|
||||||
// std::wstring but can't be implicitly converted to them. You need to enable
|
|
||||||
// the option below for the latter.
|
|
||||||
//
|
|
||||||
// Default is 1 for most compilers.
|
|
||||||
//
|
|
||||||
// Recommended setting: 1 unless you want to ensure your program doesn't use
|
|
||||||
// the standard C++ library at all.
|
|
||||||
#define wxUSE_STD_STRING wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
// Make wxString as much interchangeable with std::[w]string as possible, in
|
// Make wxString as much interchangeable with std::[w]string as possible, in
|
||||||
// particular allow implicit conversion of wxString to either of these classes.
|
// particular allow implicit conversion of wxString to either of these classes.
|
||||||
// This comes at a price (or a benefit, depending on your point of view) of not
|
// This comes at a price (or a benefit, depending on your point of view) of not
|
||||||
|
|
@ -353,6 +314,10 @@
|
||||||
// disabled by default but can be enabled for your build if you don't care
|
// disabled by default but can be enabled for your build if you don't care
|
||||||
// about compatibility.
|
// about compatibility.
|
||||||
//
|
//
|
||||||
|
// Note that wxString can always be constructed from std::[w]string, whether
|
||||||
|
// this option is turned on or off, it only enables implicit conversion in the
|
||||||
|
// other direction.
|
||||||
|
//
|
||||||
// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled.
|
// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled.
|
||||||
//
|
//
|
||||||
// Recommended setting: 0 to remain compatible with the official builds of
|
// Recommended setting: 0 to remain compatible with the official builds of
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,7 @@
|
||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
#include "wx/dynarray.h"
|
#include "wx/dynarray.h"
|
||||||
|
|
||||||
#if wxUSE_STD_CONTAINERS_COMPATIBLY
|
#include <vector>
|
||||||
#include <vector>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// these functions are only used in STL build now but we define them in any
|
// these functions are only used in STL build now but we define them in any
|
||||||
// case for compatibility with the existing code outside of the library which
|
// case for compatibility with the existing code outside of the library which
|
||||||
|
|
@ -508,14 +506,12 @@ public:
|
||||||
m_data.ptr = strings;
|
m_data.ptr = strings;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STD_CONTAINERS_COMPATIBLY
|
|
||||||
// construct an adapter from a vector of strings
|
// construct an adapter from a vector of strings
|
||||||
wxArrayStringsAdapter(const std::vector<wxString>& strings)
|
wxArrayStringsAdapter(const std::vector<wxString>& strings)
|
||||||
: m_type(wxSTRING_POINTER), m_size(strings.size())
|
: m_type(wxSTRING_POINTER), m_size(strings.size())
|
||||||
{
|
{
|
||||||
m_data.ptr = m_size == 0 ? nullptr : &strings[0];
|
m_data.ptr = m_size == 0 ? nullptr : &strings[0];
|
||||||
}
|
}
|
||||||
#endif // wxUSE_STD_CONTAINERS_COMPATIBLY
|
|
||||||
|
|
||||||
// construct an adapter from a single wxString
|
// construct an adapter from a single wxString
|
||||||
wxArrayStringsAdapter(const wxString& s)
|
wxArrayStringsAdapter(const wxString& s)
|
||||||
|
|
|
||||||
|
|
@ -314,14 +314,6 @@
|
||||||
# endif
|
# endif
|
||||||
#endif /* !defined(wxUSE_STD_CONTAINERS) */
|
#endif /* !defined(wxUSE_STD_CONTAINERS) */
|
||||||
|
|
||||||
#ifndef wxUSE_STD_CONTAINERS_COMPATIBLY
|
|
||||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
|
||||||
# error "wxUSE_STD_CONTAINERS_COMPATIBLY must be defined, please read comment near the top of this file."
|
|
||||||
# else
|
|
||||||
# define wxUSE_STD_CONTAINERS_COMPATIBLY 0
|
|
||||||
# endif
|
|
||||||
#endif /* !defined(wxUSE_STD_CONTAINERS_COMPATIBLY) */
|
|
||||||
|
|
||||||
#ifndef wxUSE_STD_STRING_CONV_IN_WXSTRING
|
#ifndef wxUSE_STD_STRING_CONV_IN_WXSTRING
|
||||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||||
# error "wxUSE_STD_STRING_CONV_IN_WXSTRING must be defined, please read comment near the top of this file."
|
# error "wxUSE_STD_STRING_CONV_IN_WXSTRING must be defined, please read comment near the top of this file."
|
||||||
|
|
@ -2053,15 +2045,6 @@
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if !wxUSE_STREAMS && !wxUSE_STD_IOSTREAM
|
|
||||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
|
||||||
# error "DocView requires wxUSE_STREAMS or wxUSE_STD_IOSTREAM"
|
|
||||||
# else
|
|
||||||
# undef wxUSE_STREAMS
|
|
||||||
# define wxUSE_STREAMS 1
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# if !wxUSE_FILE_HISTORY
|
# if !wxUSE_FILE_HISTORY
|
||||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||||
# error "DocView requires wxUSE_FILE_HISTORY"
|
# error "DocView requires wxUSE_FILE_HISTORY"
|
||||||
|
|
|
||||||
|
|
@ -134,12 +134,7 @@ public:
|
||||||
typedef wxCmdLineArg value_type;
|
typedef wxCmdLineArg value_type;
|
||||||
typedef const wxCmdLineArg* pointer;
|
typedef const wxCmdLineArg* pointer;
|
||||||
typedef const wxCmdLineArg& reference;
|
typedef const wxCmdLineArg& reference;
|
||||||
|
|
||||||
// We avoid dependency on standard library by default but if we do use
|
|
||||||
// std::string, then it's ok to use iterator tags as well.
|
|
||||||
#if wxUSE_STD_STRING
|
|
||||||
typedef std::bidirectional_iterator_tag iterator_category;
|
typedef std::bidirectional_iterator_tag iterator_category;
|
||||||
#endif // wx_USE_STD_STRING
|
|
||||||
|
|
||||||
const_iterator() : m_parser(nullptr), m_index(0) {}
|
const_iterator() : m_parser(nullptr), m_index(0) {}
|
||||||
reference operator *() const;
|
reference operator *() const;
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,7 @@
|
||||||
#include "wx/arrstr.h"
|
#include "wx/arrstr.h"
|
||||||
#include "wx/control.h" // base class
|
#include "wx/control.h" // base class
|
||||||
|
|
||||||
#if wxUSE_STD_CONTAINERS_COMPATIBLY
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#endif // wxUSE_STD_CONTAINERS_COMPATIBLY
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxItemContainer defines an interface which is implemented by all controls
|
// wxItemContainer defines an interface which is implemented by all controls
|
||||||
|
|
@ -219,11 +217,8 @@ public:
|
||||||
const wxString *items,
|
const wxString *items,
|
||||||
wxClientData **clientData)
|
wxClientData **clientData)
|
||||||
{ return AppendItems(wxArrayStringsAdapter(n, items), clientData); }
|
{ return AppendItems(wxArrayStringsAdapter(n, items), clientData); }
|
||||||
|
|
||||||
#if wxUSE_STD_CONTAINERS_COMPATIBLY
|
|
||||||
int Append(const std::vector<wxString>& items)
|
int Append(const std::vector<wxString>& items)
|
||||||
{ return AppendItems(items); }
|
{ return AppendItems(items); }
|
||||||
#endif // wxUSE_STD_CONTAINERS_COMPATIBLY
|
|
||||||
|
|
||||||
// only for RTTI needs (separate name)
|
// only for RTTI needs (separate name)
|
||||||
void AppendString(const wxString& item)
|
void AppendString(const wxString& item)
|
||||||
|
|
@ -263,11 +258,8 @@ public:
|
||||||
unsigned int pos,
|
unsigned int pos,
|
||||||
wxClientData **clientData)
|
wxClientData **clientData)
|
||||||
{ return InsertItems(wxArrayStringsAdapter(n, items), pos, clientData); }
|
{ return InsertItems(wxArrayStringsAdapter(n, items), pos, clientData); }
|
||||||
|
|
||||||
#if wxUSE_STD_CONTAINERS_COMPATIBLY
|
|
||||||
int Insert(const std::vector<wxString>& items, unsigned int pos)
|
int Insert(const std::vector<wxString>& items, unsigned int pos)
|
||||||
{ return InsertItems(items, pos); }
|
{ return InsertItems(items, pos); }
|
||||||
#endif // wxUSE_STD_CONTAINERS_COMPATIBLY
|
|
||||||
|
|
||||||
// replacing items
|
// replacing items
|
||||||
// ---------------
|
// ---------------
|
||||||
|
|
@ -284,11 +276,8 @@ public:
|
||||||
{ Clear(); Append(n, items, clientData); }
|
{ Clear(); Append(n, items, clientData); }
|
||||||
void Set(unsigned int n, const wxString *items, wxClientData **clientData)
|
void Set(unsigned int n, const wxString *items, wxClientData **clientData)
|
||||||
{ Clear(); Append(n, items, clientData); }
|
{ Clear(); Append(n, items, clientData); }
|
||||||
|
|
||||||
#if wxUSE_STD_CONTAINERS_COMPATIBLY
|
|
||||||
void Set(const std::vector<wxString>& items)
|
void Set(const std::vector<wxString>& items)
|
||||||
{ Clear(); Append(items); }
|
{ Clear(); Append(items); }
|
||||||
#endif // wxUSE_STD_CONTAINERS_COMPATIBLY
|
|
||||||
|
|
||||||
// deleting items
|
// deleting items
|
||||||
// --------------
|
// --------------
|
||||||
|
|
|
||||||
|
|
@ -2602,17 +2602,15 @@ typedef int (* LINKAGEMODE wxListIterateFunction)(void *current);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__CYGWIN__) && defined(__WXMSW__)
|
#if defined(__CYGWIN__) && defined(__WXMSW__)
|
||||||
# if wxUSE_STD_CONTAINERS || defined(wxUSE_STD_STRING)
|
/*
|
||||||
/*
|
NASTY HACK because the gethostname in sys/unistd.h which the gnu
|
||||||
NASTY HACK because the gethostname in sys/unistd.h which the gnu
|
stl includes and wx builds with by default clash with each other
|
||||||
stl includes and wx builds with by default clash with each other
|
(windows version 2nd param is int, sys/unistd.h version is unsigned
|
||||||
(windows version 2nd param is int, sys/unistd.h version is unsigned
|
int).
|
||||||
int).
|
*/
|
||||||
*/
|
# define gethostname gethostnameHACK
|
||||||
# define gethostname gethostnameHACK
|
# include <unistd.h>
|
||||||
# include <unistd.h>
|
# undef gethostname
|
||||||
# undef gethostname
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------- */
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,7 @@
|
||||||
|
|
||||||
#include "wx/scrolwin.h"
|
#include "wx/scrolwin.h"
|
||||||
|
|
||||||
#if wxUSE_STD_CONTAINERS_COMPATIBLY
|
#include <iterator>
|
||||||
#include <iterator>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// constants
|
// constants
|
||||||
|
|
@ -1129,9 +1127,7 @@ public:
|
||||||
class iterator
|
class iterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
#if wxUSE_STD_CONTAINERS_COMPATIBLY
|
|
||||||
typedef std::forward_iterator_tag iterator_category;
|
typedef std::forward_iterator_tag iterator_category;
|
||||||
#endif
|
|
||||||
typedef ptrdiff_t difference_type;
|
typedef ptrdiff_t difference_type;
|
||||||
typedef wxGridBlockCoords value_type;
|
typedef wxGridBlockCoords value_type;
|
||||||
typedef const value_type& reference;
|
typedef const value_type& reference;
|
||||||
|
|
|
||||||
|
|
@ -284,35 +284,11 @@
|
||||||
//
|
//
|
||||||
// Default is 0
|
// Default is 0
|
||||||
//
|
//
|
||||||
// Recommended setting: 0 as the options below already provide a relatively
|
// Recommended setting: 1 for new code bases and if compatibility with the
|
||||||
// good level of interoperability and changing this option arguably isn't worth
|
// official build of the library is not important, 0 otherwise.
|
||||||
// diverging from the official builds of the library.
|
|
||||||
#define wxUSE_STL 0
|
#define wxUSE_STL 0
|
||||||
|
|
||||||
// This is not a real option but is used as the default value for
|
// Use standard C++ containers to implement all wx container classes.
|
||||||
// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS_COMPATIBLY.
|
|
||||||
//
|
|
||||||
// Set it to 0 if you want to disable the use of all standard classes
|
|
||||||
// completely for some reason.
|
|
||||||
#define wxUSE_STD_DEFAULT 1
|
|
||||||
|
|
||||||
// Use standard C++ containers where it can be done without breaking backwards
|
|
||||||
// compatibility.
|
|
||||||
//
|
|
||||||
// This provides better interoperability with the standard library, e.g. with
|
|
||||||
// this option on it's possible to insert std::vector<> into many wxWidgets
|
|
||||||
// containers directly.
|
|
||||||
//
|
|
||||||
// Default is 1.
|
|
||||||
//
|
|
||||||
// Recommended setting is 1 unless you want to avoid all dependencies on the
|
|
||||||
// standard library.
|
|
||||||
#define wxUSE_STD_CONTAINERS_COMPATIBLY wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<>
|
|
||||||
// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but
|
|
||||||
// usually more limited) implementations are used which allows to avoid the
|
|
||||||
// dependency on the C++ run-time library.
|
|
||||||
//
|
//
|
||||||
// Default is 0 for compatibility reasons.
|
// Default is 0 for compatibility reasons.
|
||||||
//
|
//
|
||||||
|
|
@ -321,30 +297,15 @@
|
||||||
#define wxUSE_STD_CONTAINERS 0
|
#define wxUSE_STD_CONTAINERS 0
|
||||||
|
|
||||||
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
||||||
// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the
|
// disabled, wx streams are used instead.
|
||||||
// standard streams library.
|
|
||||||
//
|
//
|
||||||
// Notice that enabling this does not replace wx streams with std streams
|
// Notice that enabling this does not replace wx streams with std streams
|
||||||
// everywhere, in a lot of places wx streams are used no matter what.
|
// everywhere, in a lot of places wx streams are used no matter what.
|
||||||
//
|
//
|
||||||
// Default is 1 if compiler supports it.
|
// Default is 1.
|
||||||
//
|
//
|
||||||
// Recommended setting: 1 if you use the standard streams anyhow and so
|
// Recommended setting: 1.
|
||||||
// dependency on the standard streams library is not a
|
#define wxUSE_STD_IOSTREAM 1
|
||||||
// problem
|
|
||||||
#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
// Enable minimal interoperability with the standard C++ string class if 1.
|
|
||||||
// "Minimal" means that wxString can be constructed from std::string or
|
|
||||||
// std::wstring but can't be implicitly converted to them. You need to enable
|
|
||||||
// the option below for the latter.
|
|
||||||
//
|
|
||||||
// Default is 1 for most compilers.
|
|
||||||
//
|
|
||||||
// Recommended setting: 1 unless you want to ensure your program doesn't use
|
|
||||||
// the standard C++ library at all.
|
|
||||||
#define wxUSE_STD_STRING wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
// Make wxString as much interchangeable with std::[w]string as possible, in
|
// Make wxString as much interchangeable with std::[w]string as possible, in
|
||||||
// particular allow implicit conversion of wxString to either of these classes.
|
// particular allow implicit conversion of wxString to either of these classes.
|
||||||
// This comes at a price (or a benefit, depending on your point of view) of not
|
// This comes at a price (or a benefit, depending on your point of view) of not
|
||||||
|
|
@ -354,6 +315,10 @@
|
||||||
// disabled by default but can be enabled for your build if you don't care
|
// disabled by default but can be enabled for your build if you don't care
|
||||||
// about compatibility.
|
// about compatibility.
|
||||||
//
|
//
|
||||||
|
// Note that wxString can always be constructed from std::[w]string, whether
|
||||||
|
// this option is turned on or off, it only enables implicit conversion in the
|
||||||
|
// other direction.
|
||||||
|
//
|
||||||
// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled.
|
// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled.
|
||||||
//
|
//
|
||||||
// Recommended setting: 0 to remain compatible with the official builds of
|
// Recommended setting: 0 to remain compatible with the official builds of
|
||||||
|
|
|
||||||
|
|
@ -596,15 +596,11 @@ private:
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
// Helper macro defining common iterator typedefs
|
// Helper macro defining common iterator typedefs
|
||||||
#if wxUSE_STD_CONTAINERS_COMPATIBLY
|
#include <iterator>
|
||||||
#include <iterator>
|
|
||||||
|
|
||||||
#define WX_DECLARE_LIST_ITER_DIFF_AND_CATEGORY() \
|
#define WX_DECLARE_LIST_ITER_DIFF_AND_CATEGORY() \
|
||||||
typedef std::ptrdiff_t difference_type; \
|
typedef std::ptrdiff_t difference_type; \
|
||||||
typedef std::bidirectional_iterator_tag iterator_category;
|
typedef std::bidirectional_iterator_tag iterator_category;
|
||||||
#else
|
|
||||||
#define WX_DECLARE_LIST_ITER_DIFF_AND_CATEGORY()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// and now some heavy magic...
|
// and now some heavy magic...
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,14 +31,4 @@ struct wxIsMovable
|
||||||
static const bool value = true; \
|
static const bool value = true; \
|
||||||
};
|
};
|
||||||
|
|
||||||
// Our implementation of wxString is written in such way that it's safe to move
|
|
||||||
// it around (unless position cache is used which unfortunately breaks this).
|
|
||||||
// OTOH, we don't know anything about std::string.
|
|
||||||
// (NB: we don't put this into string.h and choose to include wx/string.h from
|
|
||||||
// here instead so that rarely-used wxIsMovable<T> code isn't included by
|
|
||||||
// everything)
|
|
||||||
#if !wxUSE_STD_STRING && !wxUSE_STRING_POS_CACHE
|
|
||||||
WX_DECLARE_TYPE_MOVABLE(wxString)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // _WX_META_MOVABLE_H_
|
#endif // _WX_META_MOVABLE_H_
|
||||||
|
|
|
||||||
|
|
@ -284,35 +284,11 @@
|
||||||
//
|
//
|
||||||
// Default is 0
|
// Default is 0
|
||||||
//
|
//
|
||||||
// Recommended setting: 0 as the options below already provide a relatively
|
// Recommended setting: 1 for new code bases and if compatibility with the
|
||||||
// good level of interoperability and changing this option arguably isn't worth
|
// official build of the library is not important, 0 otherwise.
|
||||||
// diverging from the official builds of the library.
|
|
||||||
#define wxUSE_STL 0
|
#define wxUSE_STL 0
|
||||||
|
|
||||||
// This is not a real option but is used as the default value for
|
// Use standard C++ containers to implement all wx container classes.
|
||||||
// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS_COMPATIBLY.
|
|
||||||
//
|
|
||||||
// Set it to 0 if you want to disable the use of all standard classes
|
|
||||||
// completely for some reason.
|
|
||||||
#define wxUSE_STD_DEFAULT 1
|
|
||||||
|
|
||||||
// Use standard C++ containers where it can be done without breaking backwards
|
|
||||||
// compatibility.
|
|
||||||
//
|
|
||||||
// This provides better interoperability with the standard library, e.g. with
|
|
||||||
// this option on it's possible to insert std::vector<> into many wxWidgets
|
|
||||||
// containers directly.
|
|
||||||
//
|
|
||||||
// Default is 1.
|
|
||||||
//
|
|
||||||
// Recommended setting is 1 unless you want to avoid all dependencies on the
|
|
||||||
// standard library.
|
|
||||||
#define wxUSE_STD_CONTAINERS_COMPATIBLY wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<>
|
|
||||||
// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but
|
|
||||||
// usually more limited) implementations are used which allows to avoid the
|
|
||||||
// dependency on the C++ run-time library.
|
|
||||||
//
|
//
|
||||||
// Default is 0 for compatibility reasons.
|
// Default is 0 for compatibility reasons.
|
||||||
//
|
//
|
||||||
|
|
@ -321,30 +297,15 @@
|
||||||
#define wxUSE_STD_CONTAINERS 0
|
#define wxUSE_STD_CONTAINERS 0
|
||||||
|
|
||||||
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
||||||
// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the
|
// disabled, wx streams are used instead.
|
||||||
// standard streams library.
|
|
||||||
//
|
//
|
||||||
// Notice that enabling this does not replace wx streams with std streams
|
// Notice that enabling this does not replace wx streams with std streams
|
||||||
// everywhere, in a lot of places wx streams are used no matter what.
|
// everywhere, in a lot of places wx streams are used no matter what.
|
||||||
//
|
//
|
||||||
// Default is 1 if compiler supports it.
|
// Default is 1.
|
||||||
//
|
//
|
||||||
// Recommended setting: 1 if you use the standard streams anyhow and so
|
// Recommended setting: 1.
|
||||||
// dependency on the standard streams library is not a
|
#define wxUSE_STD_IOSTREAM 1
|
||||||
// problem
|
|
||||||
#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
// Enable minimal interoperability with the standard C++ string class if 1.
|
|
||||||
// "Minimal" means that wxString can be constructed from std::string or
|
|
||||||
// std::wstring but can't be implicitly converted to them. You need to enable
|
|
||||||
// the option below for the latter.
|
|
||||||
//
|
|
||||||
// Default is 1 for most compilers.
|
|
||||||
//
|
|
||||||
// Recommended setting: 1 unless you want to ensure your program doesn't use
|
|
||||||
// the standard C++ library at all.
|
|
||||||
#define wxUSE_STD_STRING wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
// Make wxString as much interchangeable with std::[w]string as possible, in
|
// Make wxString as much interchangeable with std::[w]string as possible, in
|
||||||
// particular allow implicit conversion of wxString to either of these classes.
|
// particular allow implicit conversion of wxString to either of these classes.
|
||||||
// This comes at a price (or a benefit, depending on your point of view) of not
|
// This comes at a price (or a benefit, depending on your point of view) of not
|
||||||
|
|
@ -354,6 +315,10 @@
|
||||||
// disabled by default but can be enabled for your build if you don't care
|
// disabled by default but can be enabled for your build if you don't care
|
||||||
// about compatibility.
|
// about compatibility.
|
||||||
//
|
//
|
||||||
|
// Note that wxString can always be constructed from std::[w]string, whether
|
||||||
|
// this option is turned on or off, it only enables implicit conversion in the
|
||||||
|
// other direction.
|
||||||
|
//
|
||||||
// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled.
|
// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled.
|
||||||
//
|
//
|
||||||
// Recommended setting: 0 to remain compatible with the official builds of
|
// Recommended setting: 0 to remain compatible with the official builds of
|
||||||
|
|
|
||||||
|
|
@ -290,35 +290,11 @@
|
||||||
//
|
//
|
||||||
// Default is 0
|
// Default is 0
|
||||||
//
|
//
|
||||||
// Recommended setting: 0 as the options below already provide a relatively
|
// Recommended setting: 1 for new code bases and if compatibility with the
|
||||||
// good level of interoperability and changing this option arguably isn't worth
|
// official build of the library is not important, 0 otherwise.
|
||||||
// diverging from the official builds of the library.
|
|
||||||
#define wxUSE_STL 0
|
#define wxUSE_STL 0
|
||||||
|
|
||||||
// This is not a real option but is used as the default value for
|
// Use standard C++ containers to implement all wx container classes.
|
||||||
// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS_COMPATIBLY.
|
|
||||||
//
|
|
||||||
// Set it to 0 if you want to disable the use of all standard classes
|
|
||||||
// completely for some reason.
|
|
||||||
#define wxUSE_STD_DEFAULT 1
|
|
||||||
|
|
||||||
// Use standard C++ containers where it can be done without breaking backwards
|
|
||||||
// compatibility.
|
|
||||||
//
|
|
||||||
// This provides better interoperability with the standard library, e.g. with
|
|
||||||
// this option on it's possible to insert std::vector<> into many wxWidgets
|
|
||||||
// containers directly.
|
|
||||||
//
|
|
||||||
// Default is 1.
|
|
||||||
//
|
|
||||||
// Recommended setting is 1 unless you want to avoid all dependencies on the
|
|
||||||
// standard library.
|
|
||||||
#define wxUSE_STD_CONTAINERS_COMPATIBLY wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<>
|
|
||||||
// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but
|
|
||||||
// usually more limited) implementations are used which allows to avoid the
|
|
||||||
// dependency on the C++ run-time library.
|
|
||||||
//
|
//
|
||||||
// Default is 0 for compatibility reasons.
|
// Default is 0 for compatibility reasons.
|
||||||
//
|
//
|
||||||
|
|
@ -327,30 +303,15 @@
|
||||||
#define wxUSE_STD_CONTAINERS 0
|
#define wxUSE_STD_CONTAINERS 0
|
||||||
|
|
||||||
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
||||||
// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the
|
// disabled, wx streams are used instead.
|
||||||
// standard streams library.
|
|
||||||
//
|
//
|
||||||
// Notice that enabling this does not replace wx streams with std streams
|
// Notice that enabling this does not replace wx streams with std streams
|
||||||
// everywhere, in a lot of places wx streams are used no matter what.
|
// everywhere, in a lot of places wx streams are used no matter what.
|
||||||
//
|
//
|
||||||
// Default is 1 if compiler supports it.
|
// Default is 1.
|
||||||
//
|
//
|
||||||
// Recommended setting: 1 if you use the standard streams anyhow and so
|
// Recommended setting: 1.
|
||||||
// dependency on the standard streams library is not a
|
#define wxUSE_STD_IOSTREAM 1
|
||||||
// problem
|
|
||||||
#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
// Enable minimal interoperability with the standard C++ string class if 1.
|
|
||||||
// "Minimal" means that wxString can be constructed from std::string or
|
|
||||||
// std::wstring but can't be implicitly converted to them. You need to enable
|
|
||||||
// the option below for the latter.
|
|
||||||
//
|
|
||||||
// Default is 1 for most compilers.
|
|
||||||
//
|
|
||||||
// Recommended setting: 1 unless you want to ensure your program doesn't use
|
|
||||||
// the standard C++ library at all.
|
|
||||||
#define wxUSE_STD_STRING wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
// Make wxString as much interchangeable with std::[w]string as possible, in
|
// Make wxString as much interchangeable with std::[w]string as possible, in
|
||||||
// particular allow implicit conversion of wxString to either of these classes.
|
// particular allow implicit conversion of wxString to either of these classes.
|
||||||
// This comes at a price (or a benefit, depending on your point of view) of not
|
// This comes at a price (or a benefit, depending on your point of view) of not
|
||||||
|
|
@ -360,6 +321,10 @@
|
||||||
// disabled by default but can be enabled for your build if you don't care
|
// disabled by default but can be enabled for your build if you don't care
|
||||||
// about compatibility.
|
// about compatibility.
|
||||||
//
|
//
|
||||||
|
// Note that wxString can always be constructed from std::[w]string, whether
|
||||||
|
// this option is turned on or off, it only enables implicit conversion in the
|
||||||
|
// other direction.
|
||||||
|
//
|
||||||
// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled.
|
// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled.
|
||||||
//
|
//
|
||||||
// Recommended setting: 0 to remain compatible with the official builds of
|
// Recommended setting: 0 to remain compatible with the official builds of
|
||||||
|
|
|
||||||
|
|
@ -280,35 +280,11 @@
|
||||||
//
|
//
|
||||||
// Default is 0
|
// Default is 0
|
||||||
//
|
//
|
||||||
// Recommended setting: 0 as the options below already provide a relatively
|
// Recommended setting: 1 for new code bases and if compatibility with the
|
||||||
// good level of interoperability and changing this option arguably isn't worth
|
// official build of the library is not important, 0 otherwise.
|
||||||
// diverging from the official builds of the library.
|
|
||||||
#define wxUSE_STL 0
|
#define wxUSE_STL 0
|
||||||
|
|
||||||
// This is not a real option but is used as the default value for
|
// Use standard C++ containers to implement all wx container classes.
|
||||||
// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS_COMPATIBLY.
|
|
||||||
//
|
|
||||||
// Set it to 0 if you want to disable the use of all standard classes
|
|
||||||
// completely for some reason.
|
|
||||||
#define wxUSE_STD_DEFAULT 1
|
|
||||||
|
|
||||||
// Use standard C++ containers where it can be done without breaking backwards
|
|
||||||
// compatibility.
|
|
||||||
//
|
|
||||||
// This provides better interoperability with the standard library, e.g. with
|
|
||||||
// this option on it's possible to insert std::vector<> into many wxWidgets
|
|
||||||
// containers directly.
|
|
||||||
//
|
|
||||||
// Default is 1.
|
|
||||||
//
|
|
||||||
// Recommended setting is 1 unless you want to avoid all dependencies on the
|
|
||||||
// standard library.
|
|
||||||
#define wxUSE_STD_CONTAINERS_COMPATIBLY wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<>
|
|
||||||
// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but
|
|
||||||
// usually more limited) implementations are used which allows to avoid the
|
|
||||||
// dependency on the C++ run-time library.
|
|
||||||
//
|
//
|
||||||
// Default is 0 for compatibility reasons.
|
// Default is 0 for compatibility reasons.
|
||||||
//
|
//
|
||||||
|
|
@ -317,30 +293,15 @@
|
||||||
#define wxUSE_STD_CONTAINERS 0
|
#define wxUSE_STD_CONTAINERS 0
|
||||||
|
|
||||||
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
||||||
// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the
|
// disabled, wx streams are used instead.
|
||||||
// standard streams library.
|
|
||||||
//
|
//
|
||||||
// Notice that enabling this does not replace wx streams with std streams
|
// Notice that enabling this does not replace wx streams with std streams
|
||||||
// everywhere, in a lot of places wx streams are used no matter what.
|
// everywhere, in a lot of places wx streams are used no matter what.
|
||||||
//
|
//
|
||||||
// Default is 1 if compiler supports it.
|
// Default is 1.
|
||||||
//
|
//
|
||||||
// Recommended setting: 1 if you use the standard streams anyhow and so
|
// Recommended setting: 1.
|
||||||
// dependency on the standard streams library is not a
|
#define wxUSE_STD_IOSTREAM 1
|
||||||
// problem
|
|
||||||
#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
// Enable minimal interoperability with the standard C++ string class if 1.
|
|
||||||
// "Minimal" means that wxString can be constructed from std::string or
|
|
||||||
// std::wstring but can't be implicitly converted to them. You need to enable
|
|
||||||
// the option below for the latter.
|
|
||||||
//
|
|
||||||
// Default is 1 for most compilers.
|
|
||||||
//
|
|
||||||
// Recommended setting: 1 unless you want to ensure your program doesn't use
|
|
||||||
// the standard C++ library at all.
|
|
||||||
#define wxUSE_STD_STRING wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
// Make wxString as much interchangeable with std::[w]string as possible, in
|
// Make wxString as much interchangeable with std::[w]string as possible, in
|
||||||
// particular allow implicit conversion of wxString to either of these classes.
|
// particular allow implicit conversion of wxString to either of these classes.
|
||||||
// This comes at a price (or a benefit, depending on your point of view) of not
|
// This comes at a price (or a benefit, depending on your point of view) of not
|
||||||
|
|
@ -350,6 +311,10 @@
|
||||||
// disabled by default but can be enabled for your build if you don't care
|
// disabled by default but can be enabled for your build if you don't care
|
||||||
// about compatibility.
|
// about compatibility.
|
||||||
//
|
//
|
||||||
|
// Note that wxString can always be constructed from std::[w]string, whether
|
||||||
|
// this option is turned on or off, it only enables implicit conversion in the
|
||||||
|
// other direction.
|
||||||
|
//
|
||||||
// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled.
|
// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled.
|
||||||
//
|
//
|
||||||
// Recommended setting: 0 to remain compatible with the official builds of
|
// Recommended setting: 0 to remain compatible with the official builds of
|
||||||
|
|
|
||||||
|
|
@ -283,35 +283,11 @@
|
||||||
//
|
//
|
||||||
// Default is 0
|
// Default is 0
|
||||||
//
|
//
|
||||||
// Recommended setting: 0 as the options below already provide a relatively
|
// Recommended setting: 1 for new code bases and if compatibility with the
|
||||||
// good level of interoperability and changing this option arguably isn't worth
|
// official build of the library is not important, 0 otherwise.
|
||||||
// diverging from the official builds of the library.
|
|
||||||
#define wxUSE_STL 0
|
#define wxUSE_STL 0
|
||||||
|
|
||||||
// This is not a real option but is used as the default value for
|
// Use standard C++ containers to implement all wx container classes.
|
||||||
// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS_COMPATIBLY.
|
|
||||||
//
|
|
||||||
// Set it to 0 if you want to disable the use of all standard classes
|
|
||||||
// completely for some reason.
|
|
||||||
#define wxUSE_STD_DEFAULT 1
|
|
||||||
|
|
||||||
// Use standard C++ containers where it can be done without breaking backwards
|
|
||||||
// compatibility.
|
|
||||||
//
|
|
||||||
// This provides better interoperability with the standard library, e.g. with
|
|
||||||
// this option on it's possible to insert std::vector<> into many wxWidgets
|
|
||||||
// containers directly.
|
|
||||||
//
|
|
||||||
// Default is 1.
|
|
||||||
//
|
|
||||||
// Recommended setting is 1 unless you want to avoid all dependencies on the
|
|
||||||
// standard library.
|
|
||||||
#define wxUSE_STD_CONTAINERS_COMPATIBLY wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<>
|
|
||||||
// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but
|
|
||||||
// usually more limited) implementations are used which allows to avoid the
|
|
||||||
// dependency on the C++ run-time library.
|
|
||||||
//
|
//
|
||||||
// Default is 0 for compatibility reasons.
|
// Default is 0 for compatibility reasons.
|
||||||
//
|
//
|
||||||
|
|
@ -320,30 +296,15 @@
|
||||||
#define wxUSE_STD_CONTAINERS 0
|
#define wxUSE_STD_CONTAINERS 0
|
||||||
|
|
||||||
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
||||||
// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the
|
// disabled, wx streams are used instead.
|
||||||
// standard streams library.
|
|
||||||
//
|
//
|
||||||
// Notice that enabling this does not replace wx streams with std streams
|
// Notice that enabling this does not replace wx streams with std streams
|
||||||
// everywhere, in a lot of places wx streams are used no matter what.
|
// everywhere, in a lot of places wx streams are used no matter what.
|
||||||
//
|
//
|
||||||
// Default is 1 if compiler supports it.
|
// Default is 1.
|
||||||
//
|
//
|
||||||
// Recommended setting: 1 if you use the standard streams anyhow and so
|
// Recommended setting: 1.
|
||||||
// dependency on the standard streams library is not a
|
#define wxUSE_STD_IOSTREAM 1
|
||||||
// problem
|
|
||||||
#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
// Enable minimal interoperability with the standard C++ string class if 1.
|
|
||||||
// "Minimal" means that wxString can be constructed from std::string or
|
|
||||||
// std::wstring but can't be implicitly converted to them. You need to enable
|
|
||||||
// the option below for the latter.
|
|
||||||
//
|
|
||||||
// Default is 1 for most compilers.
|
|
||||||
//
|
|
||||||
// Recommended setting: 1 unless you want to ensure your program doesn't use
|
|
||||||
// the standard C++ library at all.
|
|
||||||
#define wxUSE_STD_STRING wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
// Make wxString as much interchangeable with std::[w]string as possible, in
|
// Make wxString as much interchangeable with std::[w]string as possible, in
|
||||||
// particular allow implicit conversion of wxString to either of these classes.
|
// particular allow implicit conversion of wxString to either of these classes.
|
||||||
// This comes at a price (or a benefit, depending on your point of view) of not
|
// This comes at a price (or a benefit, depending on your point of view) of not
|
||||||
|
|
@ -353,6 +314,10 @@
|
||||||
// disabled by default but can be enabled for your build if you don't care
|
// disabled by default but can be enabled for your build if you don't care
|
||||||
// about compatibility.
|
// about compatibility.
|
||||||
//
|
//
|
||||||
|
// Note that wxString can always be constructed from std::[w]string, whether
|
||||||
|
// this option is turned on or off, it only enables implicit conversion in the
|
||||||
|
// other direction.
|
||||||
|
//
|
||||||
// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled.
|
// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled.
|
||||||
//
|
//
|
||||||
// Recommended setting: 0 to remain compatible with the official builds of
|
// Recommended setting: 0 to remain compatible with the official builds of
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,6 @@ public:
|
||||||
inline operator wxString () const { return MakeString(); }
|
inline operator wxString () const { return MakeString(); }
|
||||||
wxString GetString() const;
|
wxString GetString() const;
|
||||||
|
|
||||||
#if wxUSE_STD_STRING
|
|
||||||
#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
|
#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
|
||||||
wxVariant(const std::string& val, const wxString& name = wxEmptyString);
|
wxVariant(const std::string& val, const wxString& name = wxEmptyString);
|
||||||
bool operator==(const std::string& value) const
|
bool operator==(const std::string& value) const
|
||||||
|
|
@ -251,7 +250,6 @@ public:
|
||||||
wxVariant& operator=(const std::wstring& value)
|
wxVariant& operator=(const std::wstring& value)
|
||||||
{ return operator=(wxString(value)); }
|
{ return operator=(wxString(value)); }
|
||||||
operator std::wstring() const { return (operator wxString()).ToStdWstring(); }
|
operator std::wstring() const { return (operator wxString()).ToStdWstring(); }
|
||||||
#endif // wxUSE_STD_STRING
|
|
||||||
|
|
||||||
// wxUniChar
|
// wxUniChar
|
||||||
wxVariant(const wxUniChar& val, const wxString& name = wxEmptyString);
|
wxVariant(const wxUniChar& val, const wxString& name = wxEmptyString);
|
||||||
|
|
|
||||||
|
|
@ -174,16 +174,9 @@
|
||||||
|
|
||||||
#define wxUSE_STL 0
|
#define wxUSE_STL 0
|
||||||
|
|
||||||
#define wxUSE_STD_DEFAULT 0
|
|
||||||
|
|
||||||
#define wxUSE_STD_CONTAINERS_COMPATIBLY wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
#define wxUSE_STD_CONTAINERS 0
|
#define wxUSE_STD_CONTAINERS 0
|
||||||
|
|
||||||
#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT
|
#define wxUSE_STD_IOSTREAM 0
|
||||||
|
|
||||||
#define wxUSE_STD_STRING wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
|
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
15
setup.h_vms
15
setup.h_vms
|
|
@ -218,20 +218,7 @@ typedef pid_t GPid;
|
||||||
|
|
||||||
#define wxUSE_STL 0
|
#define wxUSE_STL 0
|
||||||
|
|
||||||
#if defined(__DMC__) \
|
#define wxUSE_STD_CONTAINERS wxUSE_STL
|
||||||
|| (defined(_MSC_VER) && _MSC_VER < 1200)
|
|
||||||
#define wxUSE_STD_DEFAULT 0
|
|
||||||
#else
|
|
||||||
#define wxUSE_STD_DEFAULT 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define wxUSE_STD_CONTAINERS_COMPATIBLY wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
#define wxUSE_STD_STRING wxUSE_STD_DEFAULT
|
|
||||||
|
|
||||||
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
|
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -969,7 +969,6 @@ wxVariant::wxVariant(const wxScopedWCharBuffer& val, const wxString& name)
|
||||||
m_name = name;
|
m_name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STD_STRING
|
|
||||||
wxVariant::wxVariant(const std::string& val, const wxString& name)
|
wxVariant::wxVariant(const std::string& val, const wxString& name)
|
||||||
{
|
{
|
||||||
m_refData = new wxVariantDataString(wxString(val));
|
m_refData = new wxVariantDataString(wxString(val));
|
||||||
|
|
@ -981,7 +980,6 @@ wxVariant::wxVariant(const std::wstring& val, const wxString& name)
|
||||||
m_refData = new wxVariantDataString(wxString(val));
|
m_refData = new wxVariantDataString(wxString(val));
|
||||||
m_name = name;
|
m_name = name;
|
||||||
}
|
}
|
||||||
#endif // wxUSE_STD_STRING
|
|
||||||
|
|
||||||
bool wxVariant::operator== (const wxString& value) const
|
bool wxVariant::operator== (const wxString& value) const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -468,87 +468,56 @@ wxDbgHelpDLL::DumpUDT(wxPSYMBOL_INFO pSym, void *pVariable, unsigned level)
|
||||||
s.reserve(512);
|
s.reserve(512);
|
||||||
s = GetSymbolName(pSym);
|
s = GetSymbolName(pSym);
|
||||||
|
|
||||||
#if !wxUSE_STD_STRING
|
// Determine how many children this type has.
|
||||||
// special handling for ubiquitous wxString: although the code below works
|
DWORD dwChildrenCount = 0;
|
||||||
// for it as well, it shows the wxStringBase class and takes 4 lines
|
DoGetTypeInfo(pSym, TI_GET_CHILDRENCOUNT, &dwChildrenCount);
|
||||||
// instead of only one as this branch
|
|
||||||
if ( s == wxT("wxString") )
|
// Prepare to get an array of "TypeIds", representing each of the children.
|
||||||
|
TI_FINDCHILDREN_PARAMS *children = (TI_FINDCHILDREN_PARAMS *)
|
||||||
|
malloc(sizeof(TI_FINDCHILDREN_PARAMS) +
|
||||||
|
(dwChildrenCount - 1)*sizeof(ULONG));
|
||||||
|
if ( !children )
|
||||||
|
return s;
|
||||||
|
|
||||||
|
children->Count = dwChildrenCount;
|
||||||
|
children->Start = 0;
|
||||||
|
|
||||||
|
// Get the array of TypeIds, one for each child type
|
||||||
|
if ( !DoGetTypeInfo(pSym, TI_FINDCHILDREN, children) )
|
||||||
{
|
{
|
||||||
wxString *ps = (wxString *)pVariable;
|
|
||||||
|
|
||||||
// we can't just dump wxString directly as it could be corrupted or
|
|
||||||
// invalid and it could also be locked for writing (i.e. if we're
|
|
||||||
// between GetWriteBuf() and UngetWriteBuf() calls) and assert when we
|
|
||||||
// try to access it contents using public methods, so instead use our
|
|
||||||
// knowledge of its internals
|
|
||||||
const wxChar *p = nullptr;
|
|
||||||
if ( !::IsBadReadPtr(ps, sizeof(wxString)) )
|
|
||||||
{
|
|
||||||
p = ps->data();
|
|
||||||
wxStringData *data = (wxStringData *)p - 1;
|
|
||||||
if ( ::IsBadReadPtr(data, sizeof(wxStringData)) ||
|
|
||||||
::IsBadReadPtr(p, sizeof(wxChar *)*data->nAllocLength) )
|
|
||||||
{
|
|
||||||
p = nullptr; // don't touch this pointer with 10 feet pole
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
s << wxT("(\"") << (p ? p : wxT("???")) << wxT(")\"");
|
|
||||||
}
|
|
||||||
else // any other UDT
|
|
||||||
#endif // !wxUSE_STD_STRING
|
|
||||||
{
|
|
||||||
// Determine how many children this type has.
|
|
||||||
DWORD dwChildrenCount = 0;
|
|
||||||
DoGetTypeInfo(pSym, TI_GET_CHILDRENCOUNT, &dwChildrenCount);
|
|
||||||
|
|
||||||
// Prepare to get an array of "TypeIds", representing each of the children.
|
|
||||||
TI_FINDCHILDREN_PARAMS *children = (TI_FINDCHILDREN_PARAMS *)
|
|
||||||
malloc(sizeof(TI_FINDCHILDREN_PARAMS) +
|
|
||||||
(dwChildrenCount - 1)*sizeof(ULONG));
|
|
||||||
if ( !children )
|
|
||||||
return s;
|
|
||||||
|
|
||||||
children->Count = dwChildrenCount;
|
|
||||||
children->Start = 0;
|
|
||||||
|
|
||||||
// Get the array of TypeIds, one for each child type
|
|
||||||
if ( !DoGetTypeInfo(pSym, TI_FINDCHILDREN, children) )
|
|
||||||
{
|
|
||||||
free(children);
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
||||||
s << wxT(" {\n");
|
|
||||||
|
|
||||||
// Iterate through all children
|
|
||||||
wxSYMBOL_INFO sym;
|
|
||||||
wxZeroMemory(sym);
|
|
||||||
sym.ModBase = pSym->ModBase;
|
|
||||||
for ( unsigned i = 0; i < dwChildrenCount; i++ )
|
|
||||||
{
|
|
||||||
sym.TypeIndex = children->ChildId[i];
|
|
||||||
|
|
||||||
// children here are in lexicographic sense, i.e. we get all our nested
|
|
||||||
// classes and not only our member fields, but we can't get the values
|
|
||||||
// for the members of the nested classes, of course!
|
|
||||||
DWORD nested;
|
|
||||||
if ( DoGetTypeInfo(&sym, TI_GET_NESTED, &nested) && nested )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// avoid infinite recursion: this does seem to happen sometimes with
|
|
||||||
// complex typedefs...
|
|
||||||
if ( sym.TypeIndex == pSym->TypeIndex )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
s += DumpField(&sym, pVariable, level + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
free(children);
|
free(children);
|
||||||
|
return s;
|
||||||
s << wxString(wxT('\t'), level + 1) << wxT('}');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s << wxT(" {\n");
|
||||||
|
|
||||||
|
// Iterate through all children
|
||||||
|
wxSYMBOL_INFO sym;
|
||||||
|
wxZeroMemory(sym);
|
||||||
|
sym.ModBase = pSym->ModBase;
|
||||||
|
for ( unsigned i = 0; i < dwChildrenCount; i++ )
|
||||||
|
{
|
||||||
|
sym.TypeIndex = children->ChildId[i];
|
||||||
|
|
||||||
|
// children here are in lexicographic sense, i.e. we get all our nested
|
||||||
|
// classes and not only our member fields, but we can't get the values
|
||||||
|
// for the members of the nested classes, of course!
|
||||||
|
DWORD nested;
|
||||||
|
if ( DoGetTypeInfo(&sym, TI_GET_NESTED, &nested) && nested )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// avoid infinite recursion: this does seem to happen sometimes with
|
||||||
|
// complex typedefs...
|
||||||
|
if ( sym.TypeIndex == pSym->TypeIndex )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
s += DumpField(&sym, pVariable, level + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
free(children);
|
||||||
|
|
||||||
|
s << wxString(wxT('\t'), level + 1) << wxT('}');
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,12 +34,6 @@
|
||||||
#include "wx/scopedarray.h"
|
#include "wx/scopedarray.h"
|
||||||
#include "wx/dcbuffer.h"
|
#include "wx/dcbuffer.h"
|
||||||
|
|
||||||
#if !wxUSE_STD_CONTAINERS && !wxUSE_STD_IOSTREAM && !wxUSE_STD_STRING
|
|
||||||
#include "wx/beforestd.h"
|
|
||||||
#include <string>
|
|
||||||
#include "wx/afterstd.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "ScintillaWX.h"
|
#include "ScintillaWX.h"
|
||||||
#include "wx/stc/stc.h"
|
#include "wx/stc/stc.h"
|
||||||
#include "wx/stc/private.h"
|
#include "wx/stc/private.h"
|
||||||
|
|
|
||||||
|
|
@ -253,8 +253,6 @@ TEST_CASE("wxWindowList::Find", "[list]")
|
||||||
CHECK( it == l.GetFirst() );
|
CHECK( it == l.GetFirst() );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STD_CONTAINERS_COMPATIBLY
|
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
// Check that we convert wxList to std::list using the latter's ctor taking 2
|
// Check that we convert wxList to std::list using the latter's ctor taking 2
|
||||||
|
|
@ -275,5 +273,3 @@ TEST_CASE("wxList::iterator", "[list][std][iterator]")
|
||||||
const wxListBazs cli;
|
const wxListBazs cli;
|
||||||
CHECK( std::list<Baz*>(cli.begin(), cli.end()).empty() );
|
CHECK( std::list<Baz*>(cli.begin(), cli.end()).empty() );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_STD_CONTAINERS_COMPATIBLY
|
|
||||||
|
|
|
||||||
|
|
@ -520,7 +520,6 @@ TEST_CASE("StdString::Substr", "[stdstring]")
|
||||||
CHECK( s1.substr( 17, 30 ) == wxT("") );
|
CHECK( s1.substr( 17, 30 ) == wxT("") );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STD_STRING
|
|
||||||
TEST_CASE("StdString::Conversion", "[stdstring]")
|
TEST_CASE("StdString::Conversion", "[stdstring]")
|
||||||
{
|
{
|
||||||
std::string strStd("std::string value");
|
std::string strStd("std::string value");
|
||||||
|
|
@ -575,7 +574,6 @@ TEST_CASE("StdString::Conversion", "[stdstring]")
|
||||||
|
|
||||||
CHECK( wxString("bye").utf8_string() == std::string("bye") );
|
CHECK( wxString("bye").utf8_string() == std::string("bye") );
|
||||||
}
|
}
|
||||||
#endif // wxUSE_STD_STRING
|
|
||||||
|
|
||||||
TEST_CASE("StdString::Algo", "[stdstring]")
|
TEST_CASE("StdString::Algo", "[stdstring]")
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,6 @@ TEST_CASE("SizetPrintf", "[wxString][Printf][vararg]")
|
||||||
== "size_t=0xA0" );
|
== "size_t=0xA0" );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_STD_STRING
|
|
||||||
TEST_CASE("StdString", "[wxString][Printf][vararg]")
|
TEST_CASE("StdString", "[wxString][Printf][vararg]")
|
||||||
{
|
{
|
||||||
// test passing std::[w]string
|
// test passing std::[w]string
|
||||||
|
|
@ -137,7 +136,6 @@ TEST_CASE("StdString", "[wxString][Printf][vararg]")
|
||||||
s.Printf("string %s(%i).", wc, 2);
|
s.Printf("string %s(%i).", wc, 2);
|
||||||
CHECK( s == "string widechar(2)." );
|
CHECK( s == "string widechar(2)." );
|
||||||
}
|
}
|
||||||
#endif // wxUSE_STD_STRING
|
|
||||||
|
|
||||||
#if wxUSE_LONGLONG
|
#if wxUSE_LONGLONG
|
||||||
TEST_CASE("LongLongPrintf", "[wxString][Printf][vararg]")
|
TEST_CASE("LongLongPrintf", "[wxString][Printf][vararg]")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue