I’m getting quite unexpected compile error after r3336:
Error 28 error C2665: '`anonymous-namespace'::<lambda4>::<lambda4>' : none of the 2 overloads could convert all the argument typesCGameHandler.cpp 1705
Output log:
5>CGameHandler.cpp(1705): error C2665: '`anonymous-namespace'::<lambda4>::<lambda4>' : none of the 2 overloads could convert all the argument types
5> CGameHandler.cpp(1705): could be '`anonymous-namespace'::<lambda4>::(const CGHeroInstance *&,TryMoveHero &,CGameHandler *const ,CGameHandler::moveHero::ELEaveTile &,`anonymous-namespace'::<lambda3> &,CGameHandler::moveHero::EGuardLook &,const int3 &,CGameHandler::moveHero::EVisitDest &,const TerrainTile &)'
5> while trying to match the argument list '(const CGHeroInstance *, TryMoveHero, CGameHandler *const , CGameHandler::moveHero::ELEaveTile, `anonymous-namespace'::<lambda3>, CGameHandler::moveHero::EGuardLook, const int3, CGameHandler::moveHero::EVisitDest, const TerrainTile)'
5>CGameHandler.cpp(1705): fatal error C1903: unable to recover from previous error(s); stopping compilation
However, couldn’t see anything wrong with that lambda expression.
It is unexpected indeed. I have no idea what’s wrong with that lambda. It compiles fine for me (VS2012 Update 2), so it can be likely a compiler issue that I’m unable to help with.
Try moving things around (eg. make argument enums named or move their deifnitions outside the function), that often helps for such problems.
The main function in CMT.cpp has been set to “wmain” — main version for applications built in unicode model. Previously it was “_tmain” that was either expanded to main or to wmain, depending on project settings. For VC it was “wmain”, if for you it was “main”, that may be the cause of the issue. (At least I don’t think anything else could have caused that.)
Finally after many hours of instensive work and trial-and-error I’ve found a solution to generate the terrain view in a stable, flexible and halfway clearly way. All in all it required small, but important changes to the latest revision of the CMapEditManager. There are no failures or assert faults in the unit tests anymore:) There are many many combinations and a lot of exceptional cases, so even with unit tests I cannot say with 100% certainty that everything works correctly. It would involve a lot of effort to reach the 100%, which isn’t profitable. So I’ll move on and we’ll see if there are any further bugs.
Two patterns aren’t recognized yet, but they appear very rarely. So I’ll add it to my todo list, it’s ok for now. You can see that pattern/terrain view in the image below. BTW, do you know any maps where you’ve seen it?
I’ve scanned all maps and this image seems to be unused in H3 maps. But I’ve managed to get it in map editor.
Pattern (G = grass, D = dirt, S = sand), image you’re looking for is in center