* gl_rasterizer_cache: Mark file-scope functions as static where applicable
Prevents -Wmissing-declaration warnings from occurring and also makes
these functions internally linked.
* gl_rasterizer_cache: Remove unused local std::string variable
Despite being unused, compilers are unable to completely remove any code
gen related to the construction and destruction of this variable, since
the destructor of std::string is non-trivial.
Thus, we can remove it to reduce a minor amount of unnecessary code
generation
* gl_rasterizer_cache: Mark hash implementation as noexcept
This shouldn't throw.
* gl_rasterizer_cache: Remove unused variable in ClearAll()
* gl_rasterizer_cache: Make use of const on references explicit
While declared as auto&, these actually behave as const auto& variables,
due to the constness of the container being iterated. We can make this
explicit for readability sake.
* gl_rasterizer_cache: Resolve truncation warnings
The size is forwarded to a std::memset call, which takes a std::size_t
as its size parameter, so we can just make this change to silence the
warnings.
* gl_rasterizer_cache: Resolve variable shadowing warnings
Prevents a -Wshadow warning from occurring.
* GUI: Deadzone controls for sdl engine at configuration input
Co-Authored-By: CJ Bok <cjbok@users.noreply.github.com>
* configure_input: Use slider to edit modifier scale
Co-Authored-By: Kewlan <kewlan@users.noreply.github.com>
* Address minor review comment
Co-Authored-By: Kewlan <kewlan@users.noreply.github.com>
Co-authored-by: CJ Bok <cjbok@users.noreply.github.com>
Co-authored-by: Kewlan <kewlan@users.noreply.github.com>
It's undefined behavior to pass a null pointer to std::fread and
std::fwrite, even if the length passed in is zero, so we must perform
the precondition checking ourselves.
A common case where this can occur is when passing in the data of an
empty std::vector and size, as an empty vector will typically have a
null internal buffer.
While we're at it, we can move the implementation out of line and add
debug checks against passing in nullptr to std::fread and std::fwrite.
Prevents the internal buffer in the std::optional from being zeroed out
unnecessarily and instead sets the validity byte only in some
implementations.
While we're at it, we can make use of std::move to eliminate unnecessary
heap reallocations from occurring.
Allows us to avoid even more string churn by allowing the AddLine
function to make use of fmt formatting so the string is formatted all at
once instead of concatenating multiple strings.
This is similar to how yuzu's decompiler works, which I've made function
the same way in the past.
Quite a few service functions are stubbed but still pop all their
arguments, which can lead to unused variable warnings.
We can mark the unused arguments with [[maybe_unused]] to silence these
warnings until a full implementation of these functions are made.
Allows implementations to allocate the object and the shared_ptr control
block in one allocation instead of needing to do two separate
allocations.
Also looks much nicer to the reader.
* swkbd: Fix a bug where clicking Cancel hangs the game
The text is validated in `Finalize`. If the validation fails, an error is returned and the applet is not actually finalized. This can result in hangs.
This is usually not a problem as the frontend is expected to validate the text passed to `Finalize`. However, when the user clicked on `Cancel`, the text is ignored and the frontend won't do any validation. Therefore, we should skip the validation here as well.
Also fixed a potential data race. All these functions should now be called on the same thread
* Address review comments
Renamed the fields
Remove close button
This class is memcpy-ed and memcpy has the requirement that data passed
to it must be trivially copyable, otherwise the behavior is undefined.
This is trivial to resolve as BitField was made trivially copyable a
while ago, so this explicit copy assignment operator isn't necessary.