diff --git a/source/g3d_viewer/main.cpp b/source/g3d_viewer/main.cpp index dd43ba72..e378edc0 100644 --- a/source/g3d_viewer/main.cpp +++ b/source/g3d_viewer/main.cpp @@ -587,7 +587,7 @@ void MainWindow::onPaint(wxPaintEvent &event) { } } } - else if(modelPathList.size() == 0 && haveLoadedParticles) { + else if(modelPathList.empty() == true && haveLoadedParticles) { if(renderer->hasActiveParticleSystem(ParticleSystem::pst_ProjectileParticleSystem) == false && renderer->hasActiveParticleSystem(ParticleSystem::pst_SplashParticleSystem) == false) { diff --git a/source/glest_game/ai/ai.cpp b/source/glest_game/ai/ai.cpp index 7c5b8572..ca3633b6 100644 --- a/source/glest_game/ai/ai.cpp +++ b/source/glest_game/ai/ai.cpp @@ -640,7 +640,7 @@ void Ai::massiveAttack(const Vec2i &pos, Field field, bool ultraAttack){ void Ai::returnBase(int unitIndex) { Vec2i pos; CommandResult r; - int fi= aiInterface->getFactionIndex(); + aiInterface->getFactionIndex(); pos= Vec2i( random.randRange(-villageRadius, villageRadius), random.randRange(-villageRadius, villageRadius)) + getRandomHomePosition(); diff --git a/source/glest_game/ai/cartographer.cpp b/source/glest_game/ai/cartographer.cpp index 5f8b9472..f3eeee3f 100644 --- a/source/glest_game/ai/cartographer.cpp +++ b/source/glest_game/ai/cartographer.cpp @@ -41,7 +41,7 @@ Cartographer::Cartographer(World *world) Logger::getInstance().add("Cartographer", true); cellMap = world->getMap(); - int w = cellMap->getW(), h = cellMap->getH(); + //int w = cellMap->getW(), h = cellMap->getH(); routePlanner = world->getRoutePlanner(); masterMap = new AnnotatedMap(world); diff --git a/source/glest_game/ai/cluster_map.cpp b/source/glest_game/ai/cluster_map.cpp index 58a0e5a4..e7195b57 100644 --- a/source/glest_game/ai/cluster_map.cpp +++ b/source/glest_game/ai/cluster_map.cpp @@ -80,7 +80,7 @@ ClusterMap::~ClusterMap() { #define LOG(x) {} void ClusterMap::assertValid() { - bool valid[fieldCount]; + //bool valid[fieldCount]; bool inUse[fieldCount]; int numNodes[fieldCount]; int numEdges[fieldCount]; @@ -94,7 +94,7 @@ void ClusterMap::assertValid() { TKMap tkMap; - valid[f] = true; + //valid[f] = true; numNodes[f] = 0; numEdges[f] = 0; inUse[f] = aMap->maxClearance[f] != 0; @@ -111,13 +111,13 @@ void ClusterMap::assertValid() { const Transition *t = b->transitions[f].transitions[j]; if (tSet.find(t) != tSet.end()) { LOG("single transition on multiple borders.\n"); - valid[f] = false; + //valid[f] = false; } else { tSet.insert(t); TKey key(t->nwPos, t->vertical); if (tkMap.find(key) != tkMap.end()) { LOG("seperate transitions of same orientation on same cell.\n"); - valid[f] = false; + //valid[f] = false; } else { tkMap[key] = t; } @@ -131,13 +131,13 @@ void ClusterMap::assertValid() { const Transition *t = b->transitions[f].transitions[j]; if (tSet.find(t) != tSet.end()) { LOG("single transition on multiple borders.\n"); - valid[f] = false; + //valid[f] = false; } else { tSet.insert(t); TKey key(t->nwPos, t->vertical); if (tkMap.find(key) != tkMap.end()) { LOG("seperate transitions of same orientation on same cell.\n"); - valid[f] = false; + //valid[f] = false; } else { tkMap[key] = t; } @@ -153,11 +153,11 @@ void ClusterMap::assertValid() { TSet::iterator it2 = tSet.find((*eit)->transition()); if (it2 == tSet.end()) { LOG("Invalid edge.\n"); - valid[f] = false; + //valid[f] = false; } else { if (*it == *it2) { LOG("self referential transition.\n"); - valid[f] = false; + //valid[f] = false; } } ++numEdges[f]; @@ -507,7 +507,7 @@ void ClusterMap::update() { /** compute intra-cluster path lengths */ void ClusterMap::evalCluster(const Vec2i &cluster) { //_PROFILE_FUNCTION(); - int linePathSuccess = 0, linePathFail = 0; + //int linePathSuccess = 0, linePathFail = 0; SearchEngine *se = carto->getRoutePlanner()->getSearchEngine(); se->getNeighbourFunc().setSearchCluster(cluster); Transitions transitions; diff --git a/source/glest_game/ai/influence_map.h b/source/glest_game/ai/influence_map.h index 3fcfaf92..e0b6ddd3 100644 --- a/source/glest_game/ai/influence_map.h +++ b/source/glest_game/ai/influence_map.h @@ -109,15 +109,17 @@ public: } //only for infuence_map_test.cpp:249 PatchMap &operator=(const PatchMap &op){ - //FIXME: better when moved to InfluenceMap::operator=... - this->def = op.def; - this->x = op.x; this->y = op.y; this->w = op.w; this->h = op.h; - // + if(&op != this) { + //FIXME: better when moved to InfluenceMap::operator=... + this->def = op.def; + this->x = op.x; this->y = op.y; this->w = op.w; this->h = op.h; + // - sectionsPerRow = op.sectionsPerRow; - delete[] data; - data = new uint32[op.h * sectionsPerRow]; - memcpy(data, op.data, op.h * sectionsPerRow); + sectionsPerRow = op.sectionsPerRow; + delete[] data; + data = new uint32[op.h * sectionsPerRow]; + memcpy(data, op.data, op.h * sectionsPerRow); + } return *this; } ~PatchMap() { delete [] data; } diff --git a/source/glest_game/ai/route_planner.cpp b/source/glest_game/ai/route_planner.cpp index a32c5437..88948d37 100644 --- a/source/glest_game/ai/route_planner.cpp +++ b/source/glest_game/ai/route_planner.cpp @@ -107,6 +107,9 @@ RoutePlanner::RoutePlanner(World *world) , nodeStore(NULL) , tSearchEngine(NULL) , tNodeStore(NULL) { +#ifdef _GAE_DEBUG_EDITION_ + debug_texture_action=SHOW_PATH_ONLY; +#endif const int &w = world->getMap()->getW(); const int &h = world->getMap()->getH(); @@ -420,7 +423,7 @@ HAAStarResult RoutePlanner::findWaypointPathUnExplored(Unit *unit, const Vec2i & if (res == hsrFailed) { return hsrFailed; } - bool startTrap = res == hsrStartTrap; + //bool startTrap = res == hsrStartTrap; UnexploredGoal goal(world->getMap(), unit->getTeam()); UnexploredCost cost(unit->getCurrField(), unit->getType()->getSize(), unit->getTeam(), world->getMap()); TransitionHeuristic heuristic(dest); @@ -848,7 +851,7 @@ TravelState RoutePlanner::customGoalSearch(PMap1Goal &goal, Unit *unit, const Ve } UnitPath &path = *advPath; - WaypointPath &wpPath = *unit->getWaypointPath(); + //WaypointPath &wpPath = *unit->getWaypointPath(); const Vec2i &start = unit->getPos(); // setup search diff --git a/source/glest_game/graphics/debug_renderer.cpp b/source/glest_game/graphics/debug_renderer.cpp index 515afbf8..529bf2c7 100644 --- a/source/glest_game/graphics/debug_renderer.cpp +++ b/source/glest_game/graphics/debug_renderer.cpp @@ -377,7 +377,7 @@ void DebugRenderer::renderArrow( const float arrowEndSize = 0.5f; Vec3f dir = Vec3f(_pos2 - pos1); - float len = dir.length(); + //float len = dir.length(); float alphaFactor = 0.3f; dir.normalize(); diff --git a/source/glest_game/graphics/renderer.cpp b/source/glest_game/graphics/renderer.cpp index c0de87c7..0a13da53 100644 --- a/source/glest_game/graphics/renderer.cpp +++ b/source/glest_game/graphics/renderer.cpp @@ -2909,7 +2909,7 @@ void Renderer::MapRenderer::render(const Map* map,float coordStep,VisibleQuadCon } void Renderer::MapRenderer::destroy() { - while(layers.size()) { + while(layers.empty() == false) { delete layers.back(); layers.pop_back(); } @@ -5370,7 +5370,7 @@ void Renderer::renderUnitsFast(bool renderingShadows) { //render objects for selection purposes void Renderer::renderObjectsFast(bool renderingShadows, bool resourceOnly) { - const World *world= game->getWorld(); + //const World *world= game->getWorld(); //const Map *map= world->getMap(); assertGl(); @@ -6077,7 +6077,7 @@ void Renderer::renderUnitTitles3D(Font3D *font, Vec3f color) { const Unit *unit = visibleFrameUnitList[idx]; if(unit != NULL) { if(unit->getVisible() == true) { - if(unit != NULL && unit->getCurrentUnitTitle() != "") { + if(unit->getCurrentUnitTitle() != "") { //get the screen coordinates Vec3f screenPos = unit->getScreenPos(); #ifdef USE_STREFLOP diff --git a/source/glest_game/main/battle_end.cpp b/source/glest_game/main/battle_end.cpp index 2170e60b..eac4e9a1 100644 --- a/source/glest_game/main/battle_end.cpp +++ b/source/glest_game/main/battle_end.cpp @@ -128,17 +128,17 @@ void BattleEnd::render() { renderer.reset2d(); renderer.renderBackground(CoreData::getInstance().getBackgroundTexture()); - int winnerIndex = -1; + //int winnerIndex = -1; int bestScore = -1; - int mostKillsIndex = -1; + //int mostKillsIndex = -1; int bestKills = -1; - int mostEnemyKillsIndex = -1; + //int mostEnemyKillsIndex = -1; int bestEnemyKills = -1; - int leastDeathsIndex = -1; + //int leastDeathsIndex = -1; int leastDeaths = -1; - int mostUnitsProducedIndex = -1; + //int mostUnitsProducedIndex = -1; int bestUnitsProduced = -1; - int mostResourcesHarvestedIndex = -1; + //int mostResourcesHarvestedIndex = -1; int bestResourcesHarvested = -1; for(int i=0; i bestKills) { bestKills = kills; - mostKillsIndex = i; + //mostKillsIndex = i; } int enemykills= stats.getEnemyKills(i); if(enemykills > bestEnemyKills) { bestEnemyKills = enemykills; - mostEnemyKillsIndex = i; + //mostEnemyKillsIndex = i; } int deaths= stats.getDeaths(i); if(deaths < leastDeaths || leastDeaths < 0) { leastDeaths = deaths; - leastDeathsIndex = i; + //leastDeathsIndex = i; } int unitsProduced= stats.getUnitsProduced(i); if(unitsProduced > bestUnitsProduced) { bestUnitsProduced = unitsProduced; - mostUnitsProducedIndex = i; + //mostUnitsProducedIndex = i; } int resourcesHarvested = stats.getResourcesHarvested(i); if(resourcesHarvested > bestResourcesHarvested) { bestResourcesHarvested = resourcesHarvested; - mostResourcesHarvestedIndex = i; + //mostResourcesHarvestedIndex = i; } int score= enemykills*100 + unitsProduced*50 + resourcesHarvested/10; if(score > bestScore) { bestScore = score; - winnerIndex = i; + //winnerIndex = i; } } diff --git a/source/glest_game/main/main.cpp b/source/glest_game/main/main.cpp index f0e91d85..f2a3a018 100644 --- a/source/glest_game/main/main.cpp +++ b/source/glest_game/main/main.cpp @@ -1376,7 +1376,7 @@ void runTechValidationForPath(string techPath, string techName, Checksum checksum; set factions; for(int j = 0; j < factionsList.size(); ++j) { - if( filteredFactionList.size() == 0 || + if( filteredFactionList.empty() == true || std::find(filteredFactionList.begin(),filteredFactionList.end(),factionsList[j]) != filteredFactionList.end()) { factions.insert(factionsList[j]); } @@ -1385,7 +1385,7 @@ void runTechValidationForPath(string techPath, string techName, printf("\n----------------------------------------------------------------"); printf("\nChecking techPath [%s] techName [%s] total faction count = %d\n",techPath.c_str(), techName.c_str(),(int)factionsList.size()); for(int j = 0; j < factionsList.size(); ++j) { - if( filteredFactionList.size() == 0 || + if( filteredFactionList.empty() == true || std::find(filteredFactionList.begin(),filteredFactionList.end(),factionsList[j]) != filteredFactionList.end()) { printf("Using faction [%s]\n",factionsList[j].c_str()); } @@ -1989,7 +1989,7 @@ void runTechValidationReport(int argc, char** argv) { for(int idx2 = 0; idx2 < techTreeFiles.size(); idx2++) { string &techName = techTreeFiles[idx2]; - if( filteredTechTreeList.size() == 0 || + if( filteredTechTreeList.empty() == true || std::find(filteredTechTreeList.begin(),filteredTechTreeList.end(),techName) != filteredTechTreeList.end()) { runTechValidationForPath(techPath, techName, filteredFactionList, diff --git a/source/glest_game/menu/menu_state_connected_game.cpp b/source/glest_game/menu/menu_state_connected_game.cpp index 1a9cc42d..196cbe90 100644 --- a/source/glest_game/menu/menu_state_connected_game.cpp +++ b/source/glest_game/menu/menu_state_connected_game.cpp @@ -2005,7 +2005,7 @@ bool MenuStateConnectedGame::loadFactions(const GameSettings *gameSettings, bool } } - if(results.size() == 0) { + if(results.empty() == true) { if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); NetworkManager &networkManager= NetworkManager::getInstance(); diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index 15ae5cbc..9cb7f9b6 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -1523,7 +1523,7 @@ void MenuStateCustomGame::update() { ServerInterface* serverInterface= NetworkManager::getInstance().getServerInterface(); Lang& lang= Lang::getInstance(); - bool haveAtLeastOneNetworkClientConnected = false; + //bool haveAtLeastOneNetworkClientConnected = false; bool hasOneNetworkSlotOpen = false; int currentConnectionCount=0; Config &config = Config::getInstance(); @@ -1696,7 +1696,7 @@ void MenuStateCustomGame::update() { //printf("FYI we have at least 1 client connected, slot = %d'\n",i); - haveAtLeastOneNetworkClientConnected = true; + //haveAtLeastOneNetworkClientConnected = true; if(serverInterface->getSlot(i) != NULL && serverInterface->getSlot(i)->getConnectHasHandshaked()) { currentConnectionCount++; @@ -2023,7 +2023,7 @@ void MenuStateCustomGame::simpleTask(BaseThread *callingThread) { //printf("-=-=-=-=- IN MenuStateCustomGame simpleTask - B\n"); MutexSafeWrapper safeMutex(callingThread->getMutexThreadObjectAccessor(),string(__FILE__) + "_" + intToStr(__LINE__)); - bool republish = (needToRepublishToMasterserver == true && publishToServerInfo.size() != 0); + bool republish = (needToRepublishToMasterserver == true && publishToServerInfo.empty() == false); needToRepublishToMasterserver = false; std::map newPublishToServerInfo = publishToServerInfo; publishToServerInfo.clear(); @@ -2336,11 +2336,10 @@ void MenuStateCustomGame::loadGameSettings(GameSettings *gameSettings) { factionCRCList.clear(); for(unsigned int factionIdx = 0; factionIdx < factionFiles.size(); ++factionIdx) { string factionName = factionFiles[factionIdx]; - int32 factionCRC = 0; if(factionName != GameConstants::RANDOMFACTION_SLOTNAME && factionName != GameConstants::OBSERVER_SLOTNAME) { //factionCRC = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptTechs,""), "/" + gameSettings->getTech() + "/factions/" + factionName + "/*", ".xml", NULL, true); - factionCRC = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptTechs,""), "/" + gameSettings->getTech() + "/factions/" + factionName + "/*", ".xml", NULL); + int32 factionCRC = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptTechs,""), "/" + gameSettings->getTech() + "/factions/" + factionName + "/*", ".xml", NULL); if(factionCRC == 0) { factionCRC = getFolderTreeContentsCheckSumRecursively(config.getPathListForType(ptTechs,""), "/" + gameSettings->getTech() + "/factions/" + factionName + "/*", ".xml", NULL, true); } diff --git a/source/glest_game/network/server_interface.cpp b/source/glest_game/network/server_interface.cpp index 4dd9b095..90f898c9 100644 --- a/source/glest_game/network/server_interface.cpp +++ b/source/glest_game/network/server_interface.cpp @@ -1780,7 +1780,7 @@ void ServerInterface::simpleTask(BaseThread *callingThread) { CURL *handle = SystemFlags::initHTTP(); for(std::map::const_iterator iterMap = newPublishToServerInfo.begin(); - iterMap != newPublishToServerInfo.end(); iterMap++) { + iterMap != newPublishToServerInfo.end(); ++iterMap) { request += iterMap->first; request += "="; diff --git a/source/glest_game/type_instances/unit.cpp b/source/glest_game/type_instances/unit.cpp index 3132f6d2..f3a2c343 100644 --- a/source/glest_game/type_instances/unit.cpp +++ b/source/glest_game/type_instances/unit.cpp @@ -2147,7 +2147,7 @@ string Unit::getDescExtension() const{ str+= "\n" + lang.get("OrdersOnQueue") + ": "; } str+= "\n#" + intToStr(i + 1) + " " + ct->getName(); - it++; + ++it; } } diff --git a/source/glest_game/types/skill_type.cpp b/source/glest_game/types/skill_type.cpp index 5a981d33..2ab52b35 100644 --- a/source/glest_game/types/skill_type.cpp +++ b/source/glest_game/types/skill_type.cpp @@ -52,7 +52,7 @@ bool AttackBoost::isAffected(const Unit *source, const Unit *dest) const { bool destUnitMightApply = false; // All units are affected (including enemies) if(targetType == abtAll) { - destUnitMightApply = (boostUnitList.size() == 0); + destUnitMightApply = (boostUnitList.empty() == true); // Specify which units are affected for(unsigned int i = 0; i < boostUnitList.size(); ++i) { @@ -66,10 +66,10 @@ bool AttackBoost::isAffected(const Unit *source, const Unit *dest) const { } // Only same faction units are affected else if(targetType == abtFaction) { - //if(boostUnitList.size() == 0) { + //if(boostUnitList.empty() == true) { if(source->getFactionIndex() == dest->getFactionIndex()) { //destUnitMightApply = true; - destUnitMightApply = (boostUnitList.size() == 0); + destUnitMightApply = (boostUnitList.empty() == true); // Specify which units are affected for(unsigned int i = 0; i < boostUnitList.size(); ++i) { @@ -85,10 +85,10 @@ bool AttackBoost::isAffected(const Unit *source, const Unit *dest) const { } // Only ally units are affected else if(targetType == abtAlly) { - //if(boostUnitList.size() == 0) { + //if(boostUnitList.empty() == true) { if(source->isAlly(dest) == true) { //destUnitMightApply = true; - destUnitMightApply = (boostUnitList.size() == 0); + destUnitMightApply = (boostUnitList.empty() == true); // Specify which units are affected for(unsigned int i = 0; i < boostUnitList.size(); ++i) { @@ -103,10 +103,10 @@ bool AttackBoost::isAffected(const Unit *source, const Unit *dest) const { } // Only foe units are affected else if(targetType == abtFoe) { - //if(boostUnitList.size() == 0) { + //if(boostUnitList.empty() == true) { if(source->isAlly(dest) == false) { //destUnitMightApply = true; - destUnitMightApply = (boostUnitList.size() == 0); + destUnitMightApply = (boostUnitList.empty() == true); // Specify which units are affected for(unsigned int i = 0; i < boostUnitList.size(); ++i) { @@ -209,7 +209,7 @@ void SkillType::load(const XmlNode *sn, const string &dir, const TechTree *tt, SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line %d] WARNING CANNOT LOAD MODEL [%s] for parentLoader [%s]\n",__FILE__,__FUNCTION__,__LINE__,path.c_str(),parentLoader.c_str()); } } - if(animations.size() <= 0) { + if(animations.empty() == true) { char szBuf[4096]=""; sprintf(szBuf,"Error no animations found for skill [%s] for parentLoader [%s]",name.c_str(),parentLoader.c_str()); throw runtime_error(szBuf); diff --git a/source/glest_game/types/tech_tree.cpp b/source/glest_game/types/tech_tree.cpp index 9dd117ae..5d2a5b09 100644 --- a/source/glest_game/types/tech_tree.cpp +++ b/source/glest_game/types/tech_tree.cpp @@ -208,12 +208,12 @@ std::vector TechTree::validateFactionTypes() { std::vector results; for (int i = 0; i < factionTypes.size(); ++i) { std::vector factionResults = factionTypes[i].validateFactionType(); - if(factionResults.size() > 0) { + if(factionResults.empty() == false) { results.insert(results.end(), factionResults.begin(), factionResults.end()); } factionResults = factionTypes[i].validateFactionTypeUpgradeTypes(); - if(factionResults.size() > 0) { + if(factionResults.empty() == false) { results.insert(results.end(), factionResults.begin(), factionResults.end()); } } @@ -228,7 +228,7 @@ std::vector TechTree::validateResourceTypes() { //printf("Validating [%d / %d] faction [%s]\n",i,(int)factionTypes.size(),factionTypes[i].getName().c_str()); std::vector factionResults = factionTypes[i].validateFactionTypeResourceTypes(resourceTypes); - if(factionResults.size() > 0) { + if(factionResults.empty() == false) { results.insert(results.end(), factionResults.begin(), factionResults.end()); } @@ -245,7 +245,7 @@ std::vector TechTree::validateResourceTypes() { } } - if(resourceTypesNotUsed.size() > 0) { + if(resourceTypesNotUsed.empty() == false) { //printf("FOUND unused resource Types [%d]\n",(int)resourceTypesNotUsed.size()); for (unsigned int i = 0; i < resourceTypesNotUsed.size(); ++i) { diff --git a/source/glest_game/world/world.cpp b/source/glest_game/world/world.cpp index 78a219a6..d1ad5941 100644 --- a/source/glest_game/world/world.cpp +++ b/source/glest_game/world/world.cpp @@ -1280,7 +1280,7 @@ void World::initFactionTypes(GameSettings *gs) { if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); - if(factions.size() > 0) { + if(factions.empty() == false) { thisTeamIndex= getFaction(thisFactionIndex)->getTeam(); } if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); diff --git a/source/glest_map_editor/main.cpp b/source/glest_map_editor/main.cpp index 02284118..85476b41 100644 --- a/source/glest_map_editor/main.cpp +++ b/source/glest_map_editor/main.cpp @@ -81,6 +81,22 @@ MainWindow::MainWindow(string appPath) , glCanvas(NULL) , program(NULL), boxsizer(NULL), startupSettingsInited(false) { + menuFile=NULL; + menuEdit=NULL; + menuEditMirror=NULL; + menuView=NULL; + menuBrush=NULL; + menuBrushHeight=NULL; + menuBrushGradient=NULL; + menuBrushSurface=NULL; + menuBrushObject=NULL; + menuBrushResource=NULL; + menuBrushStartLocation=NULL; + menuRadius=NULL; + fileDialog=NULL; + resourceUnderMouse=0; + objectUnderMouse=0; + this->appPath = appPath; Properties::setApplicationPath(executable_path(appPath)); @@ -523,12 +539,11 @@ void MainWindow::onMouseMove(wxMouseEvent &event, int x, int y) { return; } bool repaint = false; - int dif; if (event.LeftIsDown()) { change(x, y); repaint = true; } else if (event.MiddleIsDown()) { - dif = (y - lastY); + int dif = (y - lastY); if (dif != 0) { program->incCellSize(dif / abs(dif)); repaint = true;