Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor exception removal #6961

Merged
merged 8 commits into from
Nov 8, 2019
Merged

Minor exception removal #6961

merged 8 commits into from
Nov 8, 2019

Conversation

Nekotekina
Copy link
Member

@Nekotekina Nekotekina commented Nov 7, 2019

Bits of exception removal.
Also potential minor bugfix related to network share locations on Windows.

@@ -541,7 +541,7 @@ constexpr u32 operator""_u32(const char* s, std::size_t length)
// Convert 8-byte string to u64 value like reinterpret_cast does
constexpr u64 operator""_u64(const char* s, std::size_t length)
{
return length != 8 ? throw s :
return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider for each character to check existence, for example character 8 can be read as: to_u8(length >= 8 ? s[7] : '\0')

Copy link
Member Author

@Nekotekina Nekotekina Nov 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks redundant unless there is some use case for shorter strings. It can just become "consteval" function in C++20, and explicit length checks will become redundant.

Use fs::get_virtual_device properly.
Since it's Windows-only functionality with limited use.
Gradual exception deprecation: disallow choosing exception type.
However, the function itself can remain here forever.
Since there is spu_runtime::g_escape function now.
Use std::from_chars plus minimal hex prefix support.
@Nekotekina Nekotekina merged commit 81c61e2 into RPCS3:master Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants