src/engine/gfx_common
?#if !defined(CONF_FAMILY_WINDOWS)
signal(SIGPIPE, SIG_IGN);
to server.cpp main(), maybe that helps
ok, I will create an issuefor(auto & m_aPoint : pDestQuads[QuadsCounter].m_aPoints)
m_aPoints
for type
maybe try const auto&
if that doesn't work, type of m_aPoints
probably doesn't have .begin()
and .end()
member, try to call pDestQuads[QuadsCounter].m_aPoints.begin()
to confirm for(int j = 0; j < 5; j++)
{
pDestQuads[QuadsCounter].m_aPoints[j].x += f2fx(pQuadPos[0]) - pDestQuads[QuadsCounter].m_aPoints[4].x;
pDestQuads[QuadsCounter].m_aPoints[j].y += f2fx(pQuadPos[1]) - pDestQuads[QuadsCounter].m_aPoints[4].y;
}
for(auto & m_aPoint : pDestQuads[QuadsCounter].m_aPoints)
{
m_aPoint.x += f2fx(pQuadPos[0]) - pDestQuads[QuadsCounter].m_aPoints[4].x;
m_aPoint.y += f2fx(pQuadPos[1]) - pDestQuads[QuadsCounter].m_aPoints[4].y;
}
pDestQuads
as const& and therefore can't take by normal referencebool InsertDestinationQuads(const float pGameAreas[2][2][2], const CQuad *pQuads, const int NumQuads, const CMapItemGroup *pLayerGroups[2], CQuad *pDestQuads, int &QuadsCounter)
{
bool bDataChanged = false;
for(int i = 0; i < NumQuads; i++)
{
MapObject Obs[2];
Obs[0] = CreateMapObject(pLayerGroups[0], fx2f(pQuads[i].m_aPoints[4].x), fx2f(pQuads[i].m_aPoints[4].y), 0, 0);
float pVisibleArea[2][2];
if(GetVisibleArea(pGameAreas[0], Obs[0], pVisibleArea))
{
float pQuadPos[2];
Obs[1] = CreateMapObject(pLayerGroups[1], 0, 0, 0, 0);
if(!AdaptVisiblePoint(pGameAreas, pVisibleArea, Obs, pQuadPos))
continue;
pDestQuads[QuadsCounter] = pQuads[i];
for(auto & m_aPoint : pDestQuads[QuadsCounter].m_aPoints)
{
m_aPoint.x += f2fx(pQuadPos[0]) - pDestQuads[QuadsCounter].m_aPoints[4].x;
m_aPoint.y += f2fx(pQuadPos[1]) - pDestQuads[QuadsCounter].m_aPoints[4].y;
}
QuadsCounter++;
bDataChanged = true;
}
}
return bDataChanged;
}
m_aPoints
is correct but the loop variable should be named Point
and not m_aPoint
Run scripts/fix_style.py --dry-run
src/tools/map_replace_area.cpp:433:14: error: code should be clang-formatted [-Wclang-format-violations]
for(auto & m_aPoint : pDestQuads[QuadsCounter].m_aPoints)
^
Error: Process completed with exit code 1.
m_aPoints
is correct but the loop variable should be named Point
and not m_aPoint
for(auto &m_aPoint : pDestQuads[QuadsCounter].m_aPoints)
?int main() {
int a[5];
for (auto & x : a) {
}
}
works on godbolt, clang
https://godbolt.org/z/7KPjPToa8int main() {
int a[5];
for (auto & x : a) {
}
}
works on godbolt, clang
https://godbolt.org/z/7KPjPToa8 for(auto &m_aPoint : pDestQuads[QuadsCounter].m_aPoints)
first and lets see Check style / check-style (pull_request) Successful in 2m
bcb367c
Added map_replace_area tool - sctt
742cb95
Added map_replace_area to build - sctt
87ab234
Fixed indentation - sctt
eebabaa
Fix indent - ChillerDragon
1db79fb
Log rcon messages (fixes #5342) - def-
44a79d5
Add chat and rcon to integration test - ChillerDragon
9a89e58
Add lsan.supp for opengl leak (fixes #5296) - def-
735b0bd
fifo: read() doesn't null-terminate! - def-
de55d49
Fix motd undef behavior - def-
442ae7d
Make it easier to run integration tests - def-
5768e52
Minor fixes - def-
afd4504
Fix integration argument parsing - ChillerDragon
e207fa5
Merge branch 'ddnet:master' into sctt-map_replace_area - sctt
46b500e
map_replace_area: handled layergroups parameters (offset/clip/parallax) with adaptation between source and dest map - term
bc24395
Increase client boot timeout for integration test - ChillerDragon
fad8afc
Fix whitespace is CMakeLists.txt - heinrich5991
65ad57a
Change from pnglite to libpng for PNG reading - Jupeyy
9550846
Refuse to load images of types not supported by pnglite - heinrich5991
f3bde7c
map_replace_area: fixed alphabetical order in CMakeLists.txt - sctt
2112426
map_replace_area: minor fixes to pass CI tests - sctt
ce3577d
map_replace_area: fixed indentation - sctt
8c392c9
map_replace_area: other minor fixes to pass CI tests - sctt
923e9ac
Run scripts/fix_style.py - heinrich5991
4625b55
Move PNG handling to src/engine/gfx - heinrich5991
a9d4ae4
map_replace_area: hopefully last fixes to pass CI tests - sctt
9b0396e
map_replace_area: hopefully last last fixes to pass CI tests - sctt
b75289d
Merge #4829 #5343 #5465 - bors[bot]for(auto & m_aPoint : pDestQuads[QuadsCounter].m_aPoints)
int
pointing at something?