Commit graph

33 commits

Author SHA1 Message Date
Kp 3905f1a668 Enable -Wcast-qual 2015-06-13 22:42:21 +00:00
Kp 6e96ff3e00 Fix ambiguous use of INTEL_SHORT/INTEL_INT 2015-04-02 02:36:52 +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 dc8b88eed4 Convert various loops to range_for 2015-02-14 22:48:27 +00:00
Kp 07501d2b94 Simplify gr_bitmap_rle_compress setting BM_FLAG_RLE_BIG 2015-01-29 04:27:37 +00:00
Kp 1985f7f295 Pass rle_swap_0_255 arg by & 2015-01-29 04:27:37 +00:00
Kp 27aeb6764d Pass rle_remap arg by & 2015-01-29 04:27:37 +00:00
Kp 912253ab00 Pass gr_bitmap_rle_compress arg by & 2015-01-29 04:27:37 +00:00
Kp ff4a0ccd70 Fix RAIIdmem array usage
Some RAIIdmem instances managed a T[], but were declared to manage a T.
2015-01-28 03:42:53 +00:00
Kp 5eddc2c197 Make bitmap bm_data const where easy 2014-12-02 03:24:38 +00:00
Kp ea535b0e38 Pass gr_rle_expand_scanline arg as const 2014-11-30 22:09:22 +00:00
Kp 706782b275 Pass gr_rle_getsize arg as const 2014-11-30 22:09:22 +00:00
Kp 9b2ef9cfa4 Pass gr_rle_expand_scanline_generic arg by & 2014-11-30 22:09:22 +00:00
Kp 2697918223 Pass gr_bm_pixel arg by & 2014-11-30 22:09:22 +00:00
Kp efa7566821 Pass colormap as array<> 2014-11-30 22:09:21 +00:00
Kp 4cadc18e52 Pass merge_textures_new arg by & 2014-11-30 22:09:18 +00:00
Kp dd4a0db47f Pass rle_expand_texture arg as const & 2014-11-30 22:09:17 +00:00
Kp 62ebfe9626 Pass rle_expand_texture_sub arg by & 2014-11-30 22:09:17 +00:00
Kp ee8da79953 Simplify rle_remap offset setup 2014-11-19 04:14:33 +00:00
Kp 60d4b91782 Simplify rle_swap_0_255 offset setup 2014-11-19 04:14:10 +00:00
Kp 2df4bea9b5 Use range_for in rle 2014-11-15 03:10:09 +00:00
Kp 9baeb31162 Pass rle_end arg by & 2014-11-13 03:41:38 +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 ea5be05645 Propagate for variables in common/2d/rle.cpp 2014-09-26 02:42:14 +00:00
Kp 323e796cd0 Use unique_ptr to manage grs_bitmap 2014-07-22 23:48:24 +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 3abc33d6cc Optimize gr_rle_decode 2014-06-30 23:56:51 +00:00
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
Kp 073f00974a Eliminate uses of the typedef struct X { ... } X; pattern
C++ does not require this pattern.

import re, fileinput
to = re.compile(r'^typedef struct ([a-z_A-Z]+)\s*{')
tc = re.compile(r'^}(.*?)\s*([a-z_A-Z]+);$')
osn = None
for line in fileinput.input(inplace=True):
	m = to.match(line)
	if m:
		osn = m.group(1)
		print 'struct %s\n{' % osn
		continue
	if osn:
		m = tc.match(line)
		if m:
			csn = m.group(2)
			if osn == csn:
				print '}%s;' % m.group(1)
				osn = None
				continue
			else:
				osn = None
	print line,
2013-12-28 22:48:07 +00:00
Kp 3b9b5ebfb0 Use RAII to manage function-local heap objects 2013-12-08 19:04:52 +00:00
Kp 2714679284 Mark private functions static 2013-11-02 04:23:55 +00:00
Kp 68d3b08ef9 Remove unused function gr_rle_expand_scanline_generic_masked 2013-08-07 02:33:18 +00:00
Kp 18a42e3e40 Move common/2d/rle.c -> common/2d/rle.cpp 2013-07-27 22:30:54 +00:00
Renamed from common/2d/rle.c (Browse further)