Commit graph

8661 commits

Author SHA1 Message Date
Kp 5df6dc47fb Simplify PCH filename passing 2016-08-17 04:44:22 +00:00
Kp 522c37b898 Move -mwindows from DXXProgram to DXXCommon
Environment tests should use it since it is used for the main
executable.
2016-08-14 23:47:27 +00:00
Kp 11519b4a75 Update documentation and test to exclude <gcc-4.9 2016-08-14 23:47:26 +00:00
Kp 1ca0dacb6c Cache context.sconf.Define 2016-08-13 22:20:13 +00:00
Kp 1cb62b1815 Compute Conftests self.Compile at __init__ time 2016-08-13 22:20:13 +00:00
Kp d3535e8486 Prefilter configure test names 2016-08-13 22:20:13 +00:00
Kp cbf745eb9a Switch DXXProgram._computed_extra_version to staticmethod
It did not use its class argument, so remove it.
2016-08-13 22:20:13 +00:00
Kp 20294a54ac Remove dead statements in DXXCommon.process_user_settings 2016-08-13 22:20:13 +00:00
Kp 74525090e7 Update get_found_includes hook for newer SCons
Newer SCons applied a performance optimization that breaks a technique
used in the check_header_includes=1 build.  Switch to a technique that
should work reliably on old and new SCons, although with slightly
reduced efficiency in both cases.  The effective performance penalty
should be unnoticeable and only applies to developers building with
check_header_includes=1.
2016-08-12 04:08:57 +00:00
Kp 8a4908ea2f Precompute and save C++11 required feature list
The C++11 required feature string was computed once per configured
environment.  When two or more environments were configured in a single
run, this was wasteful.  Reorder the SConf tests to precompute the
string.
2016-08-12 04:08:57 +00:00
Kp 7b173c3570 Fold use of raise StopError 2016-08-12 04:08:57 +00:00
Kp 4cb3d46148 Move <type_traits> test to Cxx11RequiredFeature
Commit 957016621e ("Remove support for
Boost.TypeTraits") removed support for any alternative implementation of
<type_traits>, so C++11 <type_traits> is now required.  Move it to
the Cxx11RequiredFeature array to combine it with the other required
feature tests.
2016-08-08 00:07:20 +00:00
Kp 95a53ed820 Require C++11 range-based for
Fallback support for Boost.Foreach is broken and no one has reported it.
The minimum required gcc version supports range-based for.  Recent Clang
supports range-based for.  No Microsoft compilers are supported.  Remove
support for the fallback Boost.Foreach and move the C++11 range-based
for test to the Cxx11RequiredFeature array.
2016-08-08 00:07:19 +00:00
Kp 1d1f3f6568 Allocate fewer jukebox pointers for small files 2016-08-08 00:07:19 +00:00
Kp 7ac89d0a14 Update jukebox song count at end of read_m3u 2016-08-08 00:07:19 +00:00
Kp 2885070ba8 Remove unnecessary ~jukebox_songs
The storage is managed by a unique_ptr, so the default destructor is
sufficient.
2016-08-08 00:07:19 +00:00
Kp 68ac4acd10 Combine jukebox allocations 2016-08-06 19:55:26 +00:00
Kp 8247713850 Use RAII for m3u FILE* 2016-08-06 19:55:26 +00:00
Kp 66422a2ea3 Combine PHYSFSX_isNewPath calls in select_file_recursive2 2016-08-06 19:55:26 +00:00
Kp 5b71faacda Use RAII to remove temporary PHYSFS search path 2016-08-06 19:55:25 +00:00
Kp a09dce6ead Remove char[N] overload for PHYSFSX_getRealPath 2016-08-06 19:55:25 +00:00
Kp a98510b17e Move CMLevelMusicTrack to CCfg 2016-08-06 19:55:25 +00:00
Kp 771665835d Move LastMission to CCfg 2016-08-06 19:55:25 +00:00
Kp ac8232caca Move CMMiscMusic to CCfg 2016-08-06 19:55:25 +00:00
Kp 50599c0dad Move CMLevelMusicPath to CCfg 2016-08-06 19:55:25 +00:00
Kp b449986ea8 Use make_unique to reset editor's Current_mission 2016-08-06 19:55:25 +00:00
Kp 53deef077a Prefer make_unique over raw new 2016-08-06 19:55:24 +00:00
Kp a1ab71f5ad Avoid calling make_unique<...>({})
The compiler may or may not recognize that the temporary T{} passed to
make_unique can be omitted.  Help it by passing nothing, then explicitly
clearing the returned data as a separate step.
2016-08-06 19:55:24 +00:00
Kp cbeb42e48c Flatten some newmenu type hierarchy 2016-08-06 19:55:24 +00:00
Kp 2e88fec559 Flatten some ui type hierarchy 2016-08-06 19:55:24 +00:00
Kp 5fb379430f Flatten some serial type hierarchy 2016-08-06 19:55:24 +00:00
Kp 6b4e639f65 Flatten newmenu_subfunction_t type 2016-08-06 19:55:24 +00:00
Kp c772385f81 Fix check_header_includes=1 Linux build 2016-08-06 19:55:24 +00:00
Kp 20ae1e2b4a Remove useless casts in d1 custom.cpp 2016-08-06 19:55:24 +00:00
Kp 1774676571 Use class to wrap Primary_weapon+Delayed_primary 2016-08-06 19:55:23 +00:00
Kp 37ec5e25d4 Declare ~UI_GADGET as protected
UI_GADGET subclasses should always be deleted through the subtype
pointer.
2016-08-06 19:55:23 +00:00
Kp df8dc7cc46 Include fwd-partial_range.h in physfs_list.h
All users of physfs_list.h included fwd-partial_range.h or
partial_range.h; physfs_list.h did not include either, but assumed one
would be available.  Include fwd to fix check_header_includes=1 build.

Fixes: ff67afd440 ("Propagate partial_range up into PHYSFSX_findFiles family")
2016-08-06 19:55:23 +00:00
Kp 7128141c55 Use enum for newmenu item type 2016-08-05 04:12:21 +00:00
Kp 3f051100a5 Move newmenu_item text_len into union 2016-07-31 22:25:51 +00:00
Kp 52d0ded9ee Cache change_res resolution computations 2016-07-31 22:25:50 +00:00
Kp f5c6b0fbf6 Move newmenu_item min_value into union 2016-07-31 22:25:50 +00:00
Kp c9aba5b04e Move newmenu_item max_value into union 2016-07-31 22:25:50 +00:00
Kp 26904ea6b3 Use range_for for newmenu_create_structure radio reset 2016-07-31 22:25:50 +00:00
Kp 344a567d1b Move newmenu_item group into union 2016-07-31 22:25:50 +00:00
Kp dd483773e0 Factor out repeated HIRESMODE tests 2016-07-31 22:25:49 +00:00
Kp 35ce30eb94 Simplify net_udp_send_fly_thru_triggers 2016-07-31 22:25:49 +00:00
Kp 7d3c3288a9 Remove support for array other than std::array
Building with Boost.Array fails due to name lookup errors.  These could
be fixed, but since no one has reported them and they are fairly old,
Boost.Array appears to be unused.  Remove support for it.

Building with std::tr1::array fails due to missing features in
std::tr1:array relative to std::array.  No one has reported this either,
so remove support for std::tr1:array.

Move the test for std::array into the Cxx11RequiredFeature list so that
it is run as part of the group test, rather than as a separate
statement.
2016-07-31 22:25:49 +00:00
Kp 2f938a35d9 Rewrite parenthesized uses of old-style numeric casts to static_cast
s/(\(float\|\(unsigned \)\?\(int\|long\)\|double\|short\|unsigned\))\s*(/static_cast<\1>(/g
2016-07-31 22:25:49 +00:00
Kp a230d24226 Allow trailing comments after num_levels and num_secrets 2016-07-30 21:56:31 +00:00
Kp c97e9af14c Use player object passed to maybe_steal_secondary_weapon 2016-07-25 03:48:09 +00:00