Lioncash
097df47641
LtRtProcessing: Amend code formatting in if'd out code block
2019-08-24 23:13:01 -04:00
Lioncash
f4fafbcb26
LtRtProcessing: Simplify allocations in LtRtProcessing constructor
...
We can use std::make_unique, which provides the same behavior as zeroing
out the buffer. Now we can remove the use of memset here.
2019-08-24 23:13:01 -04:00
Lioncash
f8e827fcd4
LtRtProcessing: Make use of if constexpr in ClampFull()
...
This is a condition known at compile-time, so we can turn it into an
if-constexpr statement. We can also make use of std::clamp in this
scenario.
2019-08-24 23:12:56 -04:00
Lioncash
93045d5264
LtRtProcessing: Make ClampFull() internally linked
...
inline provides external linkage instead of internal linkage which is
more desirable here. We can enclose it within an anonymous namespace to
make it internally linked.
2019-08-24 22:58:14 -04:00
Lioncash
068ff29b44
MIDIDecoder: Use auto for iterator type
...
Same thing, significantly less reading.
2019-08-24 22:49:16 -04:00
Lioncash
e7fe7ff49f
MIDIDecoder: Make use of std::clamp() within clamp7()
...
We can simplify the implementation of clamp7() with the use of
std::clamp().
2019-08-24 22:47:09 -04:00
Lioncash
e48a094198
MIDIDecoder: Convert return value of readContinuedValue into a std::optional
...
Rather than use an out reference, we can convert the return value into a
std::optional, combining the out reference and boolean return value into
one.
2019-08-24 22:44:33 -04:00
Phillip Stephens
7c5a9ab4df
Merge pull request #32 from lioncash/midi
...
MIDIEncoder: Make _sendMessage overload for the ContiguousContainer concept
2019-08-24 19:43:54 -07:00
Lioncash
64fbb923ca
MIDIDecoder: Make readContinuedValue an internal function
...
This doesn't rely on any member state, so it can be decoupled from the
interface entirely.
2019-08-24 22:39:13 -04:00
Lioncash
890ac24068
MIDIEncoder: Make use of _sendMessage overload
2019-08-24 22:26:20 -04:00
Lioncash
0eb9f2caeb
MIDIEncoder: Make _sendMessage overload for the ContiguousContainer concept
...
We can utilize the std::data and std::size utility functions to support
passthrough-ing data for any container that satisfies the
ContiguousContainer concept, which would be either std::array,
std::string, or std::vector.
This way we can utilize std::array internally without exposing the
inclusion within the header.
2019-08-24 21:50:08 -04:00
Phillip Stephens
4d1c7d444d
Merge pull request #31 from lioncash/hid
...
HIDParser: Use std::array where applicable
2019-08-24 18:06:10 -07:00
Lioncash
a3a9b1ada7
HIDParser: Use emplace() instead of insert()
...
Same thing, but shorter.
2019-08-24 20:58:56 -04:00
Phillip Stephens
eacb231fb8
Deprecate OpenGL
2019-08-24 17:57:39 -07:00
Lioncash
c8bebc9948
HIDParser: Eliminate variable shadowing
...
We can rename some locals to avoid shadowing other variables.
2019-08-24 20:55:52 -04:00
Lioncash
14369a9853
HIDParser: Use std::array where applicable
...
Same thing, but strongly enforces the type of the array. This also
allows removing the <type_traits> include, since we can just query the
size of the array.
2019-08-24 20:51:46 -04:00
Phillip Stephens
37ee1895ee
Merge pull request #30 from lioncash/move
...
IGraphicsDataFactory: std::move vertex and fragment tokens in newShaderPipeline
2019-08-24 17:32:59 -07:00
Phillip Stephens
6648f9f17c
Merge pull request #29 from lioncash/gl
...
GL: Use std::array where applicable
2019-08-24 17:32:49 -07:00
Phillip Stephens
6a62f96ea8
Merge pull request #28 from lioncash/array
...
D3D11: Make use of std::array where applicable
2019-08-24 17:32:04 -07:00
Lioncash
bda59575b7
IGraphicsDataFactory: std::move vertex and fragment tokens in newShaderPipeline
...
Forwards the passed in tokens to the implementing function without an
unnecessary atomic reference count increment and decrement.
2019-08-24 20:21:28 -04:00
Lioncash
ab65983750
GL: std::move vertex and fragment instances in SetupGammaResources()
...
Avoids an atomic reference count increment and decrement.
2019-08-24 20:16:04 -04:00
Lioncash
c0c353f56b
GL: Avoid casting away const
...
Resolves some -Wcast-qual warnings.
2019-08-24 20:13:57 -04:00
Lioncash
63c89a0bbf
GL: Use return value of emplace_back()
...
emplace_back() returns a reference to the emplaced element, so we can
just make use of it instead of repeatedly querying back().
2019-08-24 20:07:49 -04:00
Lioncash
e3b44edd51
GL: Use std::array where applicable
2019-08-24 19:53:23 -04:00
Lioncash
07835b58fb
GL: Make const char* pointers arrays
...
Same behavior, but only stores the string data within the executable as
opposed to the data and a pointer to it. Also makes for less reading.
2019-08-24 19:02:13 -04:00
Lioncash
8642d71e89
D3D11: Convert const char* pointers to arrays
...
Reduces binary size a little, as only the string data will be stored in
the executable and not a pointer to accompany it as well.
A trivial change that's essentially "free".
2019-08-24 18:58:50 -04:00
Lioncash
4605581d6f
D3D11: Invert conditional within setViewport()
...
Performs the same thing as the previous change, but applies it to
setViewport() instead. This also allows unindenting all code within the
function by one level.
2019-08-24 18:55:56 -04:00
Lioncash
532e58414c
D3D11: Invert conditional within setScissor()
...
Turns the condition into a guard clause, which allows unindenting all of
the code within the function by one level.
2019-08-24 18:55:56 -04:00
Lioncash
f5afb028de
D3D11: Resolve variable shadowing within setScissor()
...
We can simply remove the outer-most variable, since it's not used
anywhere.
2019-08-24 18:55:56 -04:00
Lioncash
4521acd30f
D3D11: Make use of std::array where applicable
...
Makes the arrays strongly-typed and enforces explicit array->pointer
decay. It also allows querying the array size, which can allow us to
easily dehardcode magic values within code.
2019-08-24 18:55:50 -04:00
Phillip Stephens
abc24c2d03
Merge pull request #27 from lioncash/fmt
...
General: Correct fmt specifiers
2019-08-24 14:43:07 -07:00
Lioncash
f1ad7e5ef0
General: Correct fmt specifiers
...
Corrects a few fmt calls to use fmt's specifiers. This also converts
instances of printf over to fmt::print
2019-08-24 17:12:49 -04:00
Phillip Stephens
b0c246abc7
Fix code standard violations
2019-08-20 06:57:10 -07:00
Phillip Stephens
241db19cfb
Avoid using None in enums, fix compilation
2019-08-20 01:06:52 -07:00
Phillip Stephens
091371458d
Merge pull request #26 from lioncash/header
...
General: Tidy up includes
2019-08-20 00:32:07 -07:00
Lioncash
baff71cdc3
General: Tidy up includes
...
Alphabetizes includes and resolves quite a few instances of indirect
inclusions, making the requirements of several interfaces explicit. This
also trims out includes that aren't actually necessary (likely due to
changes in the API over time).
2019-08-19 21:02:56 -04:00
Phillip Stephens
fd503b4a11
Don't use template parameter in equality op
2019-08-18 12:45:58 -07:00
Phillip Stephens
daca17e866
Add equality operators to ObjectToken
2019-08-18 12:36:56 -07:00
Phillip Stephens
1e67f49b0b
Merge pull request #25 from lioncash/finder
...
DeviceFinder: Move includes into cpp file where applicable
2019-08-18 12:09:06 -07:00
Phillip Stephens
b67eb2ba06
Merge pull request #24 from lioncash/ctor
...
IGraphicsDataFactory: Default initialize semantic for VertexElementDescriptor
2019-08-18 12:08:56 -07:00
Phillip Stephens
6be2f7520e
Merge pull request #23 from lioncash/explicit
...
BooObject: Make ObjToken operator bool explicit
2019-08-18 12:08:47 -07:00
Lioncash
90485ac1b9
DeviceFinder: Make use of unordered_map's emplace within _insertToken
...
Same thing, but less reading.
2019-08-18 05:50:37 -04:00
Lioncash
6cc5b30127
DeviceFinder: Invert conditionals within _insertToken and _removeToken
...
By converting the conditions into guard clauses, we can eliminate some
code nesting.
2019-08-18 05:48:57 -04:00
Lioncash
9853a97dd2
DeviceFinder: Move includes into cpp file where applicable
...
Avoids over-exposing inclusions that don't need to be propagated across
headers.
2019-08-18 05:45:13 -04:00
Lioncash
3ea95d9483
IGraphicsDataFactory: Default initialize semantic for VertexElementDescriptor
...
Makes initialization deterministic for the default constructor.
2019-08-18 03:53:41 -04:00
Lioncash
d973b12dcd
BooObject: Make ObjToken operator bool explicit
...
Makes explicit conversions to bool necessary to prevent error-prone
conversions to bool.
2019-08-18 03:19:53 -04:00
Phillip Stephens
2b63413369
Update logvisor
2019-08-17 22:58:48 -07:00
Phillip Stephens
f3585c7660
Merge pull request #21 from lioncash/cmake
...
CMakeLists: Migrate off variables where applicable
2019-08-17 22:56:37 -07:00
Phillip Stephens
8114361966
Merge pull request #20 from lioncash/move
...
BooObject: Make ObjToken interface noexcept where applicable
2019-08-17 22:56:26 -07:00
Phillip Stephens
9c210e5989
Merge pull request #22 from lioncash/constexpr
...
System: Make operator|= and operator&= for enums constexpr
2019-08-17 22:56:17 -07:00