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

fix: sonarcloud check #2954

Merged
merged 9 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 0 additions & 106 deletions .github/workflows/analysis-sonarcloud.yml

This file was deleted.

7 changes: 0 additions & 7 deletions sonar-project.properties

This file was deleted.

5 changes: 3 additions & 2 deletions src/lua/callbacks/events_callbacks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ class EventsCallbacks {
template <typename CallbackFunc, typename... Args>
void executeCallback(EventCallback_t eventType, CallbackFunc callbackFunc, Args &&... args) {
for (const auto &[name, callback] : getCallbacksByType(eventType)) {
auto argsCopy = std::make_tuple(args...);
if (callback && callback->isLoadedCallback()) {
auto argsCopy = std::make_tuple(args...);
std::apply(
[&callback, &callbackFunc](auto &&... args) {
[callback, &callbackFunc](auto &&... args) {
((*callback).*callbackFunc)(std::forward<decltype(args)>(args)...);
},
argsCopy
Expand All @@ -101,6 +101,7 @@ class EventsCallbacks {
}
}
}

/**
* @brief Checks if all registered callbacks of the specified event type succeed.
* @param eventType The type of event to check.
Expand Down
2 changes: 1 addition & 1 deletion src/server/network/protocol/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1883,7 +1883,7 @@ void ProtocolGame::parseQuickLootBlackWhitelist(NetworkMessage &msg) {

void ProtocolGame::parseSay(NetworkMessage &msg) {
std::string receiver;
uint16_t channelId;
uint16_t channelId {};

SpeakClasses type = static_cast<SpeakClasses>(msg.getByte());
switch (type) {
Expand Down
4 changes: 2 additions & 2 deletions src/server/network/protocol/protocolgame.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ struct TextMessage {
MessageClasses type = MESSAGE_STATUS;
std::string text;
Position position;
uint16_t channelId;
uint16_t channelId {};
struct
{
int32_t value = 0;
int32_t value {};
TextColor_t color = TEXTCOLOR_NONE;
} primary, secondary;
};
Expand Down
Loading