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

core: member + designated init and remove redundant cast #14

Merged
merged 2 commits into from
Feb 18, 2025

Conversation

Honkazel
Copy link
Contributor

Check commit description for reasons

Both pResource can be member initialized and cast is redundant since 4a53f1a
@Honkazel
Copy link
Contributor Author

maybe also add designated init there?

@vaxerski
Copy link
Member

maybe also add designated init there?

wdym

@Honkazel
Copy link
Contributor Author

const wl_interface {} = {{
.name = "{}", .version = {},
.method_count = {}, .methods = {},
.event_count = {}, .events = {},
}};

and both static const wl_message

SOURCE += std::format(" {{ .name = "{}", .signature = "{}", .types = {}}},\n", ev/rq.name, argsToShort(ev/rq.args, ev/rq.since), ev/rq.args.empty() ? "dummyTypes + 0" : TYPE_TABLE_NAME + " + 0");

@Honkazel
Copy link
Contributor Author

static const wl_message _CWlShmRequests[] = {
{ .name = "create_pool", .signature = "nhi", .types = _CWlShmCreatePoolTypes + 0},
{ .name = "release", .signature = "2", .types = dummyTypes + 0},
};

static const wl_message _CWlShmEvents[] = {
{ .name = "format", .signature = "u", .types = _CWlShmFormatTypes + 0},
};

const wl_interface wl_shm_interface = {
.name = "wl_shm", .version = 2,
.method_count = 2, .methods = _CWlShmRequests,
.event_count = 1, .events = _CWlShmEvents,
};

e.g from aquamarine wayland.cpp

@vaxerski
Copy link
Member

feel free

@Honkazel Honkazel changed the title core: member initialize and remove redundant cast core: member + designated init and remove redundant cast Feb 11, 2025
@vaxerski vaxerski merged commit 206367a into hyprwm:main Feb 18, 2025
1 check passed
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