d8f56e0e5f
Delete OpaqueStruct and use directly fancy pointers now that I know
...
how to set the deleter correctly.
2021-08-26 18:59:52 +02:00
5f341149fa
clang-format header sorting conf fix. Some spacing and order of
...
include/declaration changes.
2021-08-24 00:12:57 +02:00
299b39ad28
little tweaks here and there.
2021-08-24 00:10:09 +02:00
dc243a9fdf
little fixes here and there.
2021-08-24 00:00:28 +02:00
f6ae2c51e8
Comment a bit the code.
2021-08-23 23:50:14 +02:00
5020eab828
remove some asserts and use exceptions for the remaining ones.
2021-08-23 18:41:11 +02:00
0c0b03aeac
fix sdl include path
2021-08-23 00:00:57 +02:00
a19d2ea6bd
- mark as const every single read only variable.
...
- mark as const every pointer that can be const.
- in implementation mark const args passed by value that are meant to be read-only.
- wrap in a lambda complex initializations of (const) values.
- argument passing:
- pass by value arguments of cheap-to-copy types or meant to be copied
anyway.
- pass by (const) reference args not meant to outlive called
function scope and not cheap-to-copy.
- pass (const) pointers to (const) args when null is a valid option
and pointed data aren't expected to outlive function scope.
- use string_view for non-owned strings (not meant to outlive function
scope).
- use span for collection types like vector and arrays.
- fancy pointers passing:
- pass by value if a reference will be held:
- pass by const reference if a reference _may_ be hell.
- when no references are meant to be held:
- dereference the pointer to pass the pointed data by reference
if null is not an option.
- pass the underlying raw pointer if null is an option.
… and random subtle changes and fixes here and there that I forgot to mention.
2021-08-22 00:57:55 +02:00
76d319fb69
trash commit, style, small api changes (ref vs ptr) and who knows
2021-08-19 15:00:44 +02:00
07f7061c20
public api before private members
2021-08-15 16:13:05 +02:00
2d21c6e320
aesthetic
2021-08-14 16:45:30 +02:00
7fcb8b84a9
explicit single arg ctor
2021-08-14 16:44:47 +02:00
8b69227fe2
fix success_or_throw
2021-08-14 16:43:25 +02:00
3458ca123b
pass by value vs by ref thing
2021-08-14 16:37:42 +02:00
b11d574d9c
constructor style refactor
2021-08-14 11:53:51 +02:00
718af15b07
don't inherit directly from std::excption but from derived type and use their constructor.
2021-08-14 11:04:48 +02:00
ab34a95027
fix error checking
2021-08-14 10:18:31 +02:00
3570cf301a
format code
2021-08-14 09:25:28 +02:00
524f7511af
exception: default 'what' to 'unknown'
2021-08-14 09:24:19 +02:00
7c5277dabd
They say members defined in header are implicitly inline.
...
Also remove the static from static inline (is that C specific?)
2021-08-14 09:17:51 +02:00
5476836208
Put operator overloads for Size outside class
2021-08-13 22:04:10 +02:00
f0e89f837b
Simplify exceptions
2021-08-13 22:01:14 +02:00
e52b55f460
delete default copy/move ctor/operator=, default default ctor and
...
destructor
2021-08-13 16:11:19 +02:00
f78fa82ae8
better smart ptr owner semantic
2021-08-12 23:27:09 +02:00
5cb15abe11
code formatting.
2021-08-12 16:10:49 +02:00
d1cd97809e
littles things
2021-08-12 16:09:26 +02:00
d3be108df6
don't pass by ref scalar types, copy them.
2021-08-12 16:08:08 +02:00
d78a6b0f0e
initialize static members in source file.
2021-08-12 16:04:02 +02:00
43dd6ab820
use raw ptr instead of fancy one when no references are kept after function
...
exit.
2021-08-12 15:55:47 +02:00
0642d89803
Suppressed or defaulted constructors/assignment operators
2021-08-12 15:29:25 +02:00
31763a4563
fix missing cmath include. don't understand how it compiled until now.
2021-08-12 15:22:58 +02:00
c7bea043c2
rethink C opaque struct encapsulation
2021-08-11 15:58:04 +02:00
79f83abe3b
smart ptr and a bit of doc
2021-08-10 23:48:19 +02:00
e71a16208b
noexcept correctness intent
2021-08-08 16:04:33 +02:00
4f82826bbc
constness
2021-08-08 14:30:56 +02:00
cab6fa0cf4
wip general code improvement
2021-08-07 20:11:28 +02:00
2d4c6e3694
Extract linear and smoothstep functions. Minor tweaks.
2021-08-01 11:19:06 +02:00
13bdb970c0
config clang-tidy linter and fix code based on linting err/warn
2021-07-30 21:37:14 +02:00
3b6e900a22
format code with custom clang-format style
2021-07-29 16:06:03 +02:00
a83c4521e5
fix missing includes (for clang, gcc was working fine)
2021-07-29 15:31:39 +02:00
657c7f852c
fix struct/class forward decl incoherence, forgotten override spec and make it compile with clang 12
2021-07-28 15:15:32 +02:00
369e1c1f1b
'fix' input widget size and set back dbg outline to vp boundaries
2021-07-24 22:07:28 +02:00
ef294d67fc
rewrite template to discard pointers
2021-07-24 08:28:51 +02:00
4b87af7bc4
various changes and fixes
2021-07-23 20:08:52 +02:00
e766162b1e
move input concepts to concepts file. includes reorder
2021-07-20 15:20:46 +02:00
30c4205dab
some fixes and working sdl wrapper
2021-07-19 23:50:50 +02:00
dd3ff9358a
big hierarchy refactor, some little changes, add Font class
2021-07-18 18:26:12 +02:00