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

Cleanup patterns #56

Merged
merged 11 commits into from
Jan 21, 2024
Merged

Cleanup patterns #56

merged 11 commits into from
Jan 21, 2024

Conversation

Deewarz
Copy link
Contributor

@Deewarz Deewarz commented Jan 16, 2024

Summary

  • Remove unwanted Addr suffix on some names
  • Use hook::get_pattern() instead of hook::pattern().get_first()
  • Remove useless utils/hooking/hooking.h import (already imported in pattern.h)
  • Moving patterns to dedicated file if it was not there
  • Group by name and alphabetical order
  • Remove absolute import in sdk files
  • Remove sdk relative import in project (outside sdk folder)
  • Always use __ (2 underscores) between class name and attributes

@Deewarz Deewarz self-assigned this Jan 16, 2024
@Deewarz Deewarz marked this pull request as ready for review January 16, 2024 18:30
Copy link
Member

Choose a reason for hiding this comment

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

keep as sdk, likewise other paths should also start using absolute paths at some point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Segfaultd told me the opposite :p
Can we agree on a way to do?

Copy link
Member

Choose a reason for hiding this comment

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

relative paths are ugly, especially when they need to step out more than 2 times out of current dir, like ../../../foo/bar.h, where a single sdk/foo/bar.h would usually suffice, it's a suggestion though.

Copy link
Member

Choose a reason for hiding this comment

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

I'm with the idea of at scale taking the SDK out of MafiaMP project and making it standalone for any other project that might use it (trainer etc...).

So if we can minimize the setup required to use it (and by setup I mean creating absolute paths), isn't it better?

Open discussion @zpl-zak

Copy link
Member

Choose a reason for hiding this comment

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

Ye in that case it's fine, but let's only do that in SDK code only, please.

Just to add I'm ok with it when the included file is next to you #include "other.h" or above dir #include "../baz.h", but it gets messy in some other cases.

@Deewarz Deewarz requested review from Segfaultd and removed request for Segfaultd January 19, 2024 02:01
@Deewarz Deewarz force-pushed the reverse/cleanup branch 2 times, most recently from a5e4a17 to 1f7b8df Compare January 19, 2024 22:41
@Segfaultd Segfaultd enabled auto-merge (squash) January 21, 2024 13:50
@Segfaultd Segfaultd merged commit b7bd668 into master Jan 21, 2024
@Segfaultd Segfaultd deleted the reverse/cleanup branch January 21, 2024 13:50
@Deewarz Deewarz mentioned this pull request Mar 6, 2024
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.

4 participants