mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-21 00:19:29 +02:00
Fixed new issues detected by SonarCloud
This commit is contained in:
@ -17,24 +17,6 @@
|
||||
#include "../../lib/serializer/Cast.h"
|
||||
#include "../../lib/networkPacks/PacksForServer.h"
|
||||
|
||||
template <typename Container>
|
||||
std::string formatContainer(const Container & c, std::string delimiter = ", ", std::string opener = "(", std::string closer=")")
|
||||
{
|
||||
std::string ret = opener;
|
||||
auto itr = std::begin(c);
|
||||
if(itr != std::end(c))
|
||||
{
|
||||
ret += std::to_string(*itr);
|
||||
while(++itr != std::end(c))
|
||||
{
|
||||
ret += delimiter;
|
||||
ret += std::to_string(*itr);
|
||||
}
|
||||
}
|
||||
ret += closer;
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::ostream & operator<<(std::ostream & out, const CQuery & query)
|
||||
{
|
||||
return out << query.toString();
|
||||
|
Reference in New Issue
Block a user