Lioncash
a87209e09d
common/fileutil: Convert namespace to Common::FS
Migrates a remaining common file over to the Common namespace, making it
consistent with the rest of common files.
This also allows for high-traffic FS related code to alias the
filesystem function namespace as
namespace FS = Common::FS;
for more concise typing.
5 years ago
Lioncash
b86bba9f7e
time_zone_content_manager: Collapse auto and default case
Prevents a useless self-assignment from occurring.
5 years ago
Lioncash
910dff8816
software_keyboard: Resolve a pessimizing move warning
A std::vector created in place like this is already an rvalue and
doesn't need to be moved.
5 years ago
Lioncash
0c78ed16df
core: Resolve several -Wextra-semi warnings
We can amend one of the cascade macros to require semicolons in order to
compile. In other cases, we can just remove the superfluous semicolons.
5 years ago
Lioncash
f44ad07f2f
emu_window: Mark Scoped constructor and Acquire() as nodiscard
Ensures that callers make use of the constructor, preventing bugs from
silently occurring.
5 years ago
Lioncash
8d7e58562f
kernel/scheduler: Mark SchedulerLock constructor as nodiscard
Allows the compiler to warn about cases where the constructor is used
but then immediately discarded, which is a potential cause of
locking/unlocking bugs.
5 years ago
Lioncash
78ddcbe3ba
General: Tidy up clang-format warnings part 2
5 years ago
Lioncash
80d04c0daa
common/concepts: Rename IsBaseOf to DerivedFrom
This makes it more inline with its currently unavailable standardized
analogue std::derived_from.
While we're at it, we can also make the template match the requirements
of the standardized variant as well.
5 years ago
Lioncash
21229948aa
freezer: Move entry finding to its own function
Cleans up the callsites in other functions.
5 years ago
Lioncash
4a54d99f0d
freezer: Take address values by value
VAddr will always be 64-bit, so there's no need to take a trivial
primitive alias by reference.
5 years ago
Lioncash
b67eb6746b
freezer: Make use of std::erase_if
With C++20 we can simplify the erasing idiom.
5 years ago
Lioncash
304da7bfc8
cheat_engine: Resolve implicit bool->u64 conversion
We can just return zero here.
5 years ago
Lioncash
6c2392941b
cheat_engine: Make use of designated initializers
Same behavior, but makes the member being assigned obvious.
5 years ago
Lioncash
accf36193b
partition_data_manager: Update master key hashes
Fills in some hashes that were previously unhandled.
5 years ago
Lioncash
b0c3f66dc7
partition_data_manager: Make data arrays constexpr
Previously the constructor for all of these would run at program
startup, consuming time before the application can enter main().
This is also particularly dangerous, given the logging system wouldn't
have been initialized properly yet, yet the program would use the logs
to signify an error.
To rectify this, we can replace the literals with constexpr functions
that perform the conversion at compile-time, completely eliminating the
runtime cost of initializing these arrays.
5 years ago
Lioncash
c4f9130264
partition_data_manager: Eliminate magic value
We can use sizeof to make it obvious at the call site where the value is
coming from.
5 years ago
Lioncash
8b8cb4da9f
aes_util: Make use of non-template variant of Transcode
Same behavior, less template instantiations.
5 years ago
Lioncash
9e72b1df7d
system_control: Make functions internally linked where applicable
These functions are only ever used internally as implementation details
for GenerateRandomRange(), so these can be given internal linkage.
5 years ago
Lioncash
3ea31a9922
kernel: Remove unused variables
Resolves a few compiler warnings.
5 years ago
Lioncash
353cd8dc24
scheduler: Resolve sign conversion warning
5 years ago
Lioncash
792c1666f7
address_arbiter: Resolve sign conversion warning
Makes our type conversion explicit.
5 years ago
Lioncash
43ef4a7305
ipc_helpers: Only allow trivially copyable objects with PushRaw() and PopRaw()
It's undefined behavior to use non-trivially copyable objects with
std::memcpy, so we can add asserts to catch usages of these at
compile-time.
5 years ago
Lioncash
42c79b8507
vfs_vector: Make creation of array vfs files less verbose
We can add a helper function to make creation of these files nicer.
While we're at it, we can eliminate an unnecessary std::array copy in
the constructor. This makes the overhead on some of these functions way
less intensive, given some arrays were quite large.
e.g. The timezone location names are 9633 bytes in size.
5 years ago
Lioncash
c28e7f51f3
aes_util: Allow SetIV to be non-allocating
In a few places, the data to be set as the IV is already within an array.
We shouldn't require this data to be heap-allocated if it doesn't need
to be. This allows certain callers to reduce heap churn.
5 years ago
Lioncash
bb711ced9d
perf_stats: Make use of designated initializers
Same behavior, but allows us to avoid a now-unnecessary zero
initialization.
5 years ago
Lioncash
2a2bc9c147
perf_stats: Mark GetMeanFrametime() as const
The general pattern is to mark mutexes as mutable when it comes to
matters of constness, given the mutex acts as a transient member of a
data structure.
5 years ago
Lioncash
08e30e0240
yuzu: Resolve C++20 deprecation warnings related to lambda captures
C++20 deprecates capturing the this pointer via the '=' capture.
Instead, we replace it or extend the capture specification.
5 years ago
Lioncash
78ff298d6d
service/ldr: Resolve sign mismatch warnings
We were performing an int < size_t comparison. We can just correct the
type of the induction variable.
5 years ago
Lioncash
607a02edda
time_zone_binary: Make use of designated initializers
5 years ago
Lioncash
a1aab876e6
buffer_queue: Make use of std::nullopt
Allows compilers to eliminate unnecessary zeroing out of the optional's
buffer.
5 years ago
Lioncash
9b1ab372a7
buffer_queue: Make use of designated initializers
5 years ago
Lioncash
5430961f0d
profile_manager: Make use of std::nullopt
Allows some implementations to completely avoid unnecessarily zeroing
out the internal buffer.
5 years ago
Lioncash
1f909d614c
profile_manager: Make use of designated initializers
More compact code.
5 years ago
Lioncash
743ed2b727
dmnt_cheat_vm: Make use of designated initializers
Allows for more compact code.
5 years ago
Lioncash
2fa750dd6b
file_sys/mode: Make use of DECLARE_ENUM_FLAG_OPERATORS with Mode
Same behavior, minus a hand-rolled operator.
5 years ago
David Marcec
4d0ba04c73
sm: Make use of IsBaseOf for GetService
5 years ago
Lioncash
39ac833461
patch_manager: Resolve -Wignored-qualifier warnings
Top level const will always be ignored in this case, so it can be
removed.
5 years ago
Lioncash
872200c7a9
registered_cache: Resolve -Wmaybe_uninitialized warnings
While we're at it, we can avoid a redundant map lookup.
5 years ago
David Marcec
b20f4de430
Place in anonymous namespace
5 years ago
David Marcec
46d3c84839
loader: Make IdentifyFile typesafe
Relies on #4465 for concept.h Common::IsBaseOf
5 years ago
David
ecaac59acd
ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer ( #4465 )
* ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer
With the support of C++20, we can use concepts to deduce if a type is an STL container or not.
* More agressive concept for stl containers
* Add -fconcepts
* Move to common namespace
* Add Common::IsBaseOf
5 years ago
Morph
f6fa311cf9
minor nits
5 years ago
David Marcec
542ea8c6e8
am: Unstub SetScreenShotPermission
5 years ago
Morph
488cacca52
fsp-srv: Stub Read/WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute
Stub these 2 service commands required for Animal Crossing: New Horizons Update 1.4.0
5 years ago
Morph
06adef078c
fs: Rename SaveDataDescriptor to SaveDataAttribute
5 years ago
Morph
4a6d4ab839
xts_archive: Check if the file is nullptr prior to parsing
Fixes an access violation where the file no longer exists at the specified path while being parsed.
6 years ago
Morph
0724e89467
registered_cache: Add support for removing folder ncas
6 years ago
Morph
9fa696c0d5
configure_graphics: Remove Force 30 FPS mode
The introduction of multicore rendered this setting non-functional as timing code was changed.
This removes the setting entirely.
5 years ago
Lioncash
32ce1467e5
common/atomic_ops: Don't cast away volatile from pointers
Preserves the volatility of the pointers being casted.
5 years ago
Lioncash
078b7446c7
device_memory: Remove unused system member
This isn't used by anything in particular, so it can be removed.
5 years ago