libos+libui+wind: Use uppercase for static struct IDs to avoid confusion with fields

This commit is contained in:
apio 2023-08-15 10:28:11 +02:00
parent 820b1ae2ba
commit 2328987d81
Signed by: apio
GPG Key ID: B8A7D06E42258954
4 changed files with 8 additions and 8 deletions

View File

@ -54,7 +54,7 @@ namespace os
*/
template <typename Client, typename T> Result<void> send_async(Client& client, const T& message)
{
u8 id = T::id;
u8 id = T::ID;
TRY(client.send_typed(id));
TRY(client.send_typed(message));
return {};
@ -90,7 +90,7 @@ namespace os
Result<ResponseType> send_sync(os::LocalClient& client, const T& message,
decltype(handle_ipc_client_event) handler = handle_ipc_client_event)
{
u8 id = T::id;
u8 id = T::ID;
TRY(client.send_typed(id));
TRY(client.send_typed(message));
@ -115,7 +115,7 @@ namespace os
}
}
if (response_id != ResponseType::id)
if (response_id != ResponseType::ID)
{
TRY(handler(client, response_id));
max_other_messages--;

View File

@ -20,7 +20,7 @@ namespace ui
struct CreateWindowResponse
{
static constexpr u8 id = CREATE_WINDOW_RESPONSE_ID;
static constexpr u8 ID = CREATE_WINDOW_RESPONSE_ID;
int window;
IPC_STRING(shm_path);

View File

@ -26,14 +26,14 @@ namespace ui
struct CreateWindowRequest
{
using ResponseType = CreateWindowResponse;
static constexpr u8 id = CREATE_WINDOW_ID;
static constexpr u8 ID = CREATE_WINDOW_ID;
ui::Rect rect;
};
struct SetWindowTitleRequest
{
static constexpr u8 id = SET_WINDOW_TITLE_ID;
static constexpr u8 ID = SET_WINDOW_TITLE_ID;
int window;
IPC_STRING(title);
@ -41,7 +41,7 @@ namespace ui
struct InvalidateRequest
{
static constexpr u8 id = INVALIDATE_ID;
static constexpr u8 ID = INVALIDATE_ID;
int window;
};

View File

@ -64,7 +64,7 @@ static Result<u32*> create_shm_region(const char* path, int* outfd, ui::Rect rec
if (rc.error() == EAGAIN) \
{ \
client.rpc_in_progress = true; \
client.rpc_id = decltype(request)::id; \
client.rpc_id = decltype(request)::ID; \
return {}; \
} \
else \