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

Some cleanup and log messages silencing #7116

Merged
merged 2 commits into from Dec 31, 2019
Merged

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Dec 20, 2019

  • Prefer default initializer over std::memset 0.
  • Use fmt::format in trophy files name obtaining.
  • Use vm::ptr<>::operator bool() instead of comparing vm::ptr to vm::null or using addr().
  • Set common sceNpBasic, cellGem, cellCamera and a few others to warning level.
  • Disable logging some "offline", cellCamera error codes and a few others.

@elad335 elad335 changed the title Some cleanup and log message silencing Some cleanup and log messages silencing Dec 20, 2019
@CookiePLMonster
Copy link
Contributor

One thing you might need to keep in mind for default initialization over memset is that IIRC default initialization is only guaranteed to default initialize members and not padding bytes. So if any of these cases expect padding bytes to be zeroed, memset is preferable.

@elad335
Copy link
Contributor Author

elad335 commented Dec 20, 2019

Which is also an advantage of default initializers here because we don't memcmp or memcpy from referenced objects where padding bytes state is important. Accessing padding bytes in other ways is UB anyways (unless referenced by char/uchar ptr).

@elad335
Copy link
Contributor Author

elad335 commented Dec 20, 2019

I will check vm objects though as it may be important there.

* Prefer default initializer over std::memset 0 when possible and more readable.
* Use std::format in trophy files name obtaining.
* Use vm::ptr<>::operator bool() instead of comparing vm::ptr to vm::null or using addr().
* Add a few std::memset calls in hle where it matters (or in some places just to document an actual firmware memcpy call).
@Nekotekina Nekotekina merged commit 71c4a2a into RPCS3:master Dec 31, 2019
@elad335 elad335 deleted the cleanup branch January 1, 2020 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants