Only check for the use of NULL in C++ code, not C, for example, where
it still can, and should, be used.
Also allow using "NULL" as part of a larger macro name (where it would
be followed by "_") or at the beginning/end of a string.
This symbol is similar to the existing wxNO_IMPLICIT_WXSTRING_ENCODING
and can be defined when building the application (as opposed to when
building the library) to disable implicit wxString conversions to
pointer types, i.e. char*, wchat_t* and void*.
This makes the just added wxUSE_CHAR_CONV_IN_WXSTRING library build
option unnecessary, so remove it.
This doesn't really change anything, but allows to simplify the tests,
as we can now check only for wxNO_UNSAFE_WXSTRING_CONV and this covers
both the case of the library compiled without support for the unsafe
conversions at all and the case when the conversions are disabled by
explicitly defining wxNO_UNSAFE_WXSTRING_CONV when building the
application.
wxString is always based on std::[w]string since 2c0c727f49 (Remove wx
own wxStringImpl implementation, 2022-11-16) and all containers use
standard containers by default too now -- and there is a separate
wxUSE_STD_CONTAINERS for this anyhow.
The only remaining use of wxUSE_STL was as the default value for
wxUSE_STD_STRING_CONV_IN_WXSTRING option, but it's not really needed
for this neither, and this option can just be set to 0 by default.
Also add wxUSE_CHAR_CONV_IN_WXSTRING which can now be set to 0 too to
disable all unwanted implicit conversions (even "safe" ones, to wide
strings, in addition to the unsafe ones to narrow strings that could be
already disabled with wxUSE_UNSAFE_WXSTRING_CONV) to allow people who
don't want to have any implicit conversions at all to do it.
Keep --enable-stl configure option for compatibility, but warn if it is
used to tell people that it is not needed any longer.
This function doesn't exist any longer since 5e2da5a106 (Get rid of v2.8
code, 2022-08-01).
Remove documentation of this function and its UngetWriteBuf()
counterpart and don't refer to them in wxStringBuffer[Length]
documentation.
Document that it returns the same value as GetDPIScaleFactor() wxWindow
method and _not_ the wxWindow method with the same name.
This is very confusing, but there doesn't seem to be anything to be done
about it by now.
See #23441.
This was accidentally broken in fb4f0b590c (Remove wxGTK1 port and GPE
support, 2022-10-16): even though the commit message explicitly said
that __WXGTK20__ was still defined, it actually wasn't any more.
Fix this now by just doing it always when using wxGTK. This allows to
drop WXGTK2 variable entirely, as it's not used any longer and we don't
need to set it.
Closes#23444.
This is intentionally not very detailed, as we might find more container
classes to change in the future and listing all of the affected ones
here would require updating this list later.
Stop using a hash map indexed by the thread ID in wxMessageDialog code
to store the dialog being shown for the current thread and simply use a
thread-local variable to directly store the dialog pointer instead, as
this is much simpler.
Don't redefine a variable as a macro, this was just horrible.
Also remove a (surely outdated by now, even if it ever was true) comment
about "Cygwin bug": using a wrapper function for a global is a good idea
anyhow as it imposes the correct initialization order, so we don't need
any bogus excuses for doing it.
Make wxGridFixedIndicesSet a std::unordered_set and use unordered_map
for the other maps used by wxGrid.
Remove the initial buckets assignment, as it isn't really clear if it's
helpful.
Also remove the casts that are not needed now that we use a map with the
correct type for the keys and values.
Replace a legacy wx hash map class with the standard container.
Note that we need a special workaround for pre-C++14 compilers to use an
enum as a key of an unordered_map.
Use a vector of objects instead.
Note that this implicitly fixes a bug in wxAccelRefData copy ctor which
copied pointers that were later deleted in the dtor, i.e. would end up
being deleted twice if this ctor were actually used.