Skip to content

Commit

Permalink
Remove constexpr
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacquwes committed Sep 27, 2023
1 parent ec02645 commit 8a87aa2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shared/include/socket_messages/send_chat_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace pine::socket_messages

/// @brief Get the size of the body of the send chat message.
[[nodiscard]]
uint64_t constexpr get_body_size() const final;
uint64_t get_body_size() const final;

/// @brief Check if the given message content is valid.
/// @param content Message content to check.
Expand Down
4 changes: 3 additions & 1 deletion shared/src/socket_messages/send_chat_message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ namespace pine::socket_messages
return buffer;
}

constexpr uint64_t send_chat_message::get_body_size() const
uint64_t send_chat_message::get_body_size() const
{
// because std::string::size() isn't constexpr on linux
// for some reason
return sizeof(uint16_t) + message_content.size();
}
}

0 comments on commit 8a87aa2

Please sign in to comment.