Age | Commit message (Collapse) | Author |
|
nullptr was being returned in the error case, which, at a glance may
seem perfectly OK... until you realize that std::string has the
invariant that it may not be constructed from a null pointer. This
means that if this error case was ever hit, then the application would
most likely crash from a thrown exception in std::string's constructor.
Instead, we can change the function to return an optional value,
indicating if a failure occurred.
|
|
These are already present within the header, so they don't need to be
repeated in the cpp file.
|
|
Makes the parameter ordering consistent, and also makes the filename
parameter a std::string. A std::string would be constructed anyways with
the previous code, as IOFile's only constructor with a filepath is one
taking a std::string.
We can also make WriteStringToFile's string parameter utilize a
std::string_view for the string, making use of our previous changes to
IOFile.
|
|
The file stream open functions have supported std::string overloads
since C++11, so we don't need to use c_str() here. Same behavior, less
code.
|
|
We don't need to force the usage of a std::string here, and can instead
use a std::string_view, which allows writing out other forms of strings
(e.g. C-style strings) without any unnecessary heap allocations.
|
|
|
|
format string
This accidentally slipped through a rebase.
|
|
configuration/config: Move config loading and saving to functions based off groups
|
|
yuzu/game_list: Specify string conversions explicitly
|
|
gl_shader_decompiler: Add AddLine() overloads with single function that forwards to libfmt
|
|
Allows the game list code to compile successfully with implicit string
conversions disabled.
|
|
Allows the game list worker code to compile successfully with implicit
string conversions disabled.
|
|
SMDH is a metadata format used in some executable formats for the
Nintendo 3DS. Switch executables don't utilize this metadata format, so
this just a holdover from Citra and can be corrected.
|
|
Allows the game list item code to build with implicit string conversions
disabled.
|
|
Allows the loading screen code to compile with implicit string
conversions disabled.
While we're at it remove unnecessary const usages, and add it to nearby
variables where appropriate.
|
|
Allows the bootmanager code to compile with implicit string conversions
disabled.
|
|
Allows the util code to build with implicit string conversions disabled.
|
|
std::string concatenation
|
|
Gets rid of the need to special-case brace handling depending on the
overload used, and makes it consistent across the board with how fmt
handles them.
Strings with compile-time deducible strings are directly forwarded to
std::string's constructor, so we don't need to worry about the
performance difference here, as it'll be identical.
|
|
|
|
yuzu/configuration: Specify string conversions explicitly
|
|
This reverts a tested behavior on delay slots not exiting if the exit
flag is set. Currently new tests are required in order to ensure this
behavior.
|
|
In a lot of places throughout the decompiler, string concatenation via
operator+ is used quite heavily. This is usually fine, when not heavily
used, but when used extensively, can be a problem. operator+ creates an
entirely new heap allocated temporary string and given we perform
expressions like:
std::string thing = a + b + c + d;
this ends up with a lot of unnecessary temporary strings being created
and discarded, which kind of thrashes the heap more than we need to.
Given we utilize fmt in some AddLine calls, we can make this a part of
the ShaderWriter's API. We can make an overload that simply acts as a
passthrough to fmt.
This way, whenever things need to be appended to a string, the operation
can be done via a single string formatting operation instead of
discarding numerous temporary strings. This also has the benefit of
making the strings themselves look nicer and makes it easier to spot
errors in them.
|
|
shader: Implement AL2P and ALD.PHYS
|
|
kernel/svc: Reorganize and fix up the initial handling of svcSetThreadCoreMask()
|
|
Allows the web config code to compile with implicit string conversions
disabled. We can also deduplicate the calls to create the pixmap.
|
|
Allows the system config code to build successfully with implicit string
conversions disabled.
|
|
This is a user-facing string, so it should be marked as translatable.
|
|
Allows the per-game configuration to be successfully built with implicit
string conversions disabled.
|
|
Deduplicates array accesses and uses a named variable where appropriate.
|
|
explicitly
Allows the advanced mouse configuration code to build with implicit
string conversions disabled.
|
|
Rather than repeatedly index arrays that have quite a large array index,
we can just use a named variable instead.
|
|
Allows the player input configuration code to compile with implicit
string conversions disabled.
|
|
Dma_pusher: ASSERT on empty command_list
|
|
These are user-facing strings, so they should be localizable.
|
|
Allows the general configuration code to successfully compile with
implicit string conversions disabled.
|
|
Allows the gamelist configuration code to compile with implicit string
conversions disabled.
|
|
Avoids using the system accessor more than necessary, and ensures that
both dialog boxes see the same power on state.
|
|
We can just use qOverload here to tidy up the function cast.
|
|
Allows the audio configuration code to build with implicit string
conversions disabled.
|
|
Correct possible error on Rasterizer Caches
|
|
shader/shader_ir: Minor changes
|
|
gl_shader_disk_cache: Minor cleanup
|
|
This is a measure to avoid crashes on command list reading as an empty
command_list is considered a NOP.
|
|
service/audren_u: Get rid of magic values within GetAudioRendererWorkBufferSize
|
|
video_core/gpu_thread: Remove redundant copy constructor for CommandDataContainer
|
|
service/set: Correct and simplify behavior related to copying language codes
|
|
GPU/MMEInterpreter: Ignore the 'exit' flag when it's executed inside a delay slot.
|
|
yuzu: Remove explicit types from locks where applicable
|
|
maxwell_3d: reduce severity of different component formats assert.
|