| Age | Commit message (Collapse) | Author |
|
Filesystem: Return EntryType::Directory for the root directory.
|
|
This WriteBuffer overload expects its size argument to be in bytes, not
elements.
|
|
The reason this would never be true is that ideal_processor is a u8 and
THREADPROCESSORID_DEFAULT is an s32. In this case, it boils down to how
arithmetic conversions are performed before performing the comparison.
If an unsigned value has a lesser conversion rank (aka smaller size)
than the signed type being compared, then the unsigned value is promoted
to the signed value (i.e. u8 -> s32 happens before the comparison). No
sign-extension occurs here either.
An alternative phrasing:
Say we have a variable named core and it's given a value of -2.
u8 core = -2;
This becomes 254 due to the lack of sign. During integral promotion to
the signed type, this still remains as 254, and therefore the condition
will always be true, because no matter what value the u8 is given it
will never be -2 in terms of 32 bits.
Now, if one type was a s32 and one was a u32, this would be entirely
different, since they have the same bit width (and the signed type would
be converted to unsigned instead of the other way around) but would
still have its representation preserved in terms of bits, allowing the
comparison to be false in some cases, as opposed to being true all the
time.
---
We also get rid of two signed/unsigned comparison warnings while we're
at it.
|
|
GetSharedFontInOrderOfPriority()
This can just use the fmt specifiers and be type-agnostic.
|
|
hle_ipc: Amend usage of buffer_index within one of HLERequestContext's WriteBuffer() overloads
|
|
fsp_srv: Misc individual changes
|
|
Ensures both operands in comparisons are the same signedness.
|
|
Modernizes the loops themselves while also getting rid of a signed/unsigned
comparison in a loop condition.
|
|
Gets rid of the use of a magic constant
|
|
filesystem: Minor changes
|
|
loader/{nro, nso}: Resolve compilation warnings
|
|
It is unknown if this is correct behavior, but it makes sense and fixes a regression with Stardew Valley.
|
|
These weren't adjusted when VFS was introduced
|
|
value
We should always assume the filesystem is volatile and check each IO
operation. While we're at it reorganize checks so that early-out errors
are near one another.
|
|
Prevents implicit construction and makes these lingering non-explicit
constructors consistent with the rest of the other classes in services.
|
|
We can use emplace_back to construct the Display instances directly,
instead of constructing them separately and copying them, avoiding the
need to copy std::string and std::vector instances that are part of the
Display struct.
|
|
savedata_factory: Make SaveDataDescriptor's DebugInfo() function a const member function
|
|
partition_filesystem: Ensure all class members of PartitionFilesystem are initialized
|
|
content_archive: Minor changes
|
|
This is only ever used as a lookup into the device map, so we don't need to
take the std::string instance by value here.
|
|
WriteBuffer() overloads
Previously, the buffer_index parameter was unused, causing all writes to
use the buffer index of zero, which is not necessarily what is wanted
all the time.
Thankfully, all current usages don't use a buffer index other than zero,
so this just prevents a bug before it has a chance to spring.
|
|
We can avoid constructing a std::vector here by simply passing a pointer
to the original data and the size of the copy we wish to perform to the
backend's Write() function instead, avoiding copying the data where it's
otherwise not needed.
|
|
function
We were using a second std::vector as a buffer to convert another
std::vector's data into a byte sequence, however we can just use
pointers to the original data and use them directly with WriteBuffer,
which avoids copying the data at all into a separate std::vector.
We simply cast the pointers to u8* (which is allowed by the standard,
given std::uint8_t is an alias for unsigned char on platforms that we
support).
|
|
vfs: Deduplicate accumulation code in VfsDirectory's GetSize()
|
|
constructor
Avoids unnecessary atomic reference count incrementing and decrementing
|
|
a literal
This is simply a basic value check as opposed to potentially doing
string based operations (unlikely, but still, avoiding it is free).
|
|
This was just an artifact missed during PR review.
|
|
Prevents implicit conversions.
|
|
Gets rid of relying on indirect inclusions.
|
|
|
|
Previously we were just copying the data whole-sale, even if the length
was less than the total data size. This effectively makes the
actual_data vector useless, which is likely not intended.
Instead, amend this to only copy the given length amount of data.
At the same time, we can avoid zeroing out the data before using it by
passing iterators to the constructor instead of a size.
|
|
address_arbiter: Correct assignment within an assertion statement in WakeThreads()
|
|
core/memory, core/hle/kernel: Use std::move where applicable
|
|
member function
This function doesn't alter class state.
|
|
initialized
Previously is_hfs and pfs_header members wouldn't be initialized in the
constructor, as they were stored in locals instead. This would result in
things like GetName() and PrintDebugInfo() behaving incorrectly.
While we're at it, initialize the members to deterministic values as
well, in case loading ever fails.
|
|
There's no need to take this by value when it's possible to avoid
unnecessary copies entirely like this.
|
|
|
|
Gets rid of unnecessary atomic reference count incrementing and
decrementing.
|
|
We can just use a generic lambda to avoid writing the same thing twice.
|
|
service/prepo: Add missing header guard
|
|
|
|
We can just initialize these vectors directly via their constructor.
|
|
|
|
vm_manager: Add missing commas to string literal array elements in GetMemoryStateName()
|
|
core/memory: Remove unused function GetSpecialHandlers() and an unused variable in ZeroBlock()
|
|
core: Don't construct instance of Core::System, just to access its live instance
|
|
* Virtual Filesystem
* Fix delete bug and documentate
* Review fixes + other stuff
* Fix puyo regression
|
|
variable in ZeroBlock()
|
|
WakeThreads()
This was introduced within 4f81bc4e1bd12e4df7410c6790ba818d8dbba9c0, and
considering there's no comment indicating that this is intentional, this
is very likely a bug.
|
|
|