Commit graph

63 commits

Author SHA1 Message Date
Kp 8109379fdd Use inline namespace dsx for similar/misc/ 2015-12-13 18:00:48 +00:00
Kp ed2fa6f76a Remove unused PHYSFSX_getFreeDiskSpace 2015-11-24 04:05:35 +00:00
Kp a37bae4b4f Track output size for PHYSFSX_getRealPath 2015-10-11 22:21:00 +00:00
Kp 3ceefb4189 Pass filename to Error 2015-10-11 22:21:00 +00:00
Kp cb5c0186b3 Remove obsolete PHYSFSX_check_read/PHYSFSX_check_write overloads 2015-10-09 02:46:10 +00:00
Kp be3ab3bd81 Use range_for in PHYSFSX_checkMatchingExtension 2015-08-14 03:02:04 +00:00
Kp 4d8ae44794 Add helper macro DXX_CONSTANT_TRUE 2015-07-29 03:05:28 +00:00
Kp 29f239d6b1 Raise PHYSFSX_exists bool check to caller
All callers use a constant value, so raise the check into the caller to
let the optimizer delete the unnecessary branch.
2015-05-09 17:39:02 +00:00
Kp 9dc22b1ee6 Expand DXX_CXX11_EXPLICIT_DELETE
Various functions use the non-macro form, so support for =delete is
already mandatory.  Remove the remnants of support for compilers which
lack =delete and replace it with a hard stop when the compiler rejects
declaring explicitly deleted functions.
2015-05-01 02:18:33 +00:00
Kp 5d0a640449 Always inline PHYSFS check functions
The checking is done at compile time, so force them inline to ensure
the optimizer recognizes constants.
2015-04-26 20:15:50 +00:00
Kp 84c638ed64 Move PHYSFS_list_t to separate header 2015-04-19 04:18:49 +00:00
Kp f900d4a5ee Remove RAIIdmem::operator pointer
Mac OS X defines uint_fast32_t to unsigned int, causing ambiguous
overloads between RAIIdmem::operator[](std::size_t) and
RAIIdmem::operator[](int).  Adding a disambiguating overload for OS X
breaks Windows.  Remove operator pointer and operator[].  Rely on the
inherited operator[] for indexing.  Require users to call ->get() to
convert to a simple pointer.

First btb ambiguity reported: https://github.com/dxx-rebirth/dxx-rebirth/pull/34
Second btb ambiguity reported: https://github.com/dxx-rebirth/dxx-rebirth/pull/43
2015-02-17 03:52:59 +00:00
Kp 03576a28c2 Pass PHYSFSX_* file extensions as counted array 2015-02-14 22:48:28 +00:00
Kp 4c8f3a47b5 Convert frequently used casts to C++ casts 2015-02-05 03:03:49 +00:00
Kp 93589368c9 Move PHYSFSX_putc to the one file that uses it 2015-01-29 04:27:36 +00:00
Kp 9a36b82d5d Disallow implicit pointer conversion from rvalue smart pointers 2015-01-29 00:58:53 +00:00
Kp 3952c64ffc Fix PHYSFSX_check_* for RAIIdmem<T[]> 2015-01-28 03:42:53 +00:00
Kp d2f0bdc867 Exit cleanly on bad command line arguments 2015-01-28 03:42:53 +00:00
Kp 18a64e4281 Use RAII for PHYSFS_enumerateFiles result 2015-01-23 03:55:05 +00:00
Kp f7815810e8 Use RAIIPHYSFS_File to manage PHYSFS_File
Fixes a few leaks on error paths.
2015-01-17 18:31:42 +00:00
Kp 8c27a7d68e Require known size for PHYSFSX_fgets 2015-01-12 00:26:03 +00:00
Kp 12770802ab Use ntstring for guidebot name 2015-01-12 00:26:02 +00:00
Kp dc35b0ad88 Fix Win32 build 2015-01-03 23:44:32 +00:00
Kp 180999eed1 Fix crash loading player.ngp with bare equal 2014-12-22 04:35:48 +00:00
Kp 2766114959 Make PHYSFSX_gets_line_t::line_t be array<> 2014-12-20 04:36:10 +00:00
Kp 137746e442 List initialize credits to zero 2014-12-18 04:12:38 +00:00
Kp b8b81ba5fc Move PHYSFSX_writeAngleVec to gamesave.cpp 2014-10-26 22:56:50 +00:00
Kp bf57d03930 Move PHYSFSX_writeMatrix to gamesave.cpp 2014-10-26 22:56:50 +00:00
Kp 44084ff261 Pass PHYSFSX_readVector vector by & 2014-10-26 22:08:58 +00:00
Kp af318b9eb2 Pass PHYSFSX_writeVector vector by const & 2014-10-26 22:08:58 +00:00
Kp f465c7972f Move PHYSFSX_readVectorX to ai.cpp 2014-10-26 22:08:58 +00:00
Kp c704cc9fc9 Add const void* conversion to various types
Add operator const void*() to prevent accidental use of pointer
comparison.  With the overload present, comparing two objects triggers
an ambiguous conversion to pointer, instead of comparing the pointer
values.
2014-10-12 22:11:28 +00:00
Kp 0e65268037 Detect writing pointers 2014-09-28 21:41:06 +00:00
Kp 6b7b991bc4 Detect writing excessive data from non-integers 2014-09-28 21:37:37 +00:00
Kp 3f3b8084d1 Fix non-gcc build of physfsx.h 2014-09-22 03:34:08 +00:00
Kp 703f60ac3f Fix -Wtype-limits warnings 2014-09-21 21:41:55 +00:00
Kp e8f4b20d1d Use special type for PHYSFSX_fgets 2014-09-07 20:07:20 +00:00
Kp 1f0bf71c5e Fix off-by-one in PHYSFSX_puts_literal 2014-08-26 02:41:33 +00:00
Kp f1713f2fec Rewrite DXX_PHYSFS_CHECK_* to avoid if 2014-08-01 03:34:08 +00:00
Kp 51fdeea84b Use unique_ptr for model_data 2014-07-26 04:01:35 +00:00
Kp c1d184240d Use unique_ptr to manage fonts 2014-07-22 23:48:23 +00:00
Matt Vandermeulen 28f307eb85 Fixes #5 - Byteswap header renamed to byteutil, plus sed magic
[Kp: switch to #pragma for byteutil.h]
2014-07-03 02:03:08 +00:00
Kp b3c953375c Read lines in blocks 2014-06-22 21:56:03 +00:00
Kp dc42dad15a Check that types passed to PHYSFS_read are POD
More is needed to trap some misuses, but those traps flag existing code.
2014-06-22 18:52:00 +00:00
Kp e6a691c5c7 Check that types passed to PHYSFS_write are POD
More is needed to trap some misuses, but those traps flag existing code.
2014-06-22 03:54:35 +00:00
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
Kp 094dfbf3d4 Reduce header inclusions 2013-12-31 03:22:03 +00:00
Kp 1694eed536 Match PHYSFSX_readSXE?? return types to the internal type 2013-12-28 22:03:50 +00:00
Kp 7894647bc9 Let PHYSFSX_puts receive optional string length 2013-12-22 20:13:22 +00:00
Kp 6de986d39c Print file offset on read error 2013-12-22 20:02:26 +00:00