1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Fix issues detected by Sonar

This commit is contained in:
Ivan Savenko
2025-05-05 16:05:59 +03:00
parent cb5295b9ec
commit 4b30336d03
37 changed files with 94 additions and 114 deletions

View File

@@ -10,6 +10,7 @@
#pragma once
#include "../bonuses/CBonusSystemNode.h"
#include "../entities/artifact/EArtifactClass.h"
#include "../IGameCallback.h"
#include "../GameCallbackHolder.h"
#include "../LoadProgress.h"
@@ -111,9 +112,9 @@ public:
std::vector<const CGObjectInstance*> guardingCreatures (int3 pos) const;
/// Gets a artifact ID randomly and removes the selected artifact from this handler.
ArtifactID pickRandomArtifact(vstd::RNG & rand, int flags);
ArtifactID pickRandomArtifact(vstd::RNG & rand, std::optional<EArtifactClass> type);
ArtifactID pickRandomArtifact(vstd::RNG & rand, std::function<bool(ArtifactID)> accepts);
ArtifactID pickRandomArtifact(vstd::RNG & rand, int flags, std::function<bool(ArtifactID)> accepts);
ArtifactID pickRandomArtifact(vstd::RNG & rand, std::optional<EArtifactClass> type, std::function<bool(ArtifactID)> accepts);
ArtifactID pickRandomArtifact(vstd::RNG & rand, std::set<ArtifactID> filtered);
/// Creates instance of spell scroll artifact with provided spell