From 5be8c31d97cb89ea59abf361692a9254abcc2e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=2E=20Urba=C5=84czyk?= <mwu-tow@gazeta.pl> Date: Thu, 10 Nov 2011 12:15:27 +0000 Subject: [PATCH] [programming challenge] Minor fixes. --- server/CGameHandler.cpp | 2 +- vcmiinstall.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index 31d26bbb6..601ea71f7 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -478,7 +478,7 @@ void CGameHandler::endBattle(int3 tile, const CGHeroInstance *hero1, const CGHer time_t czas; time(&czas); std::string resultTypes[] = {"SIDE_DEFEATED", "SIDE_RETREATED", "SIDE_SURRENDERED", "SIDE_DISQUALIFIED"}; - std::ofstream resultsList(RESULTS_PATH, std::fstream::out | std::fstream::app); + std::ofstream resultsList(RESULTS_PATH.c_str(), std::fstream::out | std::fstream::app); if(resultsList) resultsList << boost::format("%s\t%s\t%s\t%d\t%d\t%s\t%s") % gs->scenarioOps->mapname % ais[0] % ais[1] % (int)battleResult.data->winner % casualtiesPoints % resultTypes[battleResult.data->result] % asctime(localtime(&czas)); else diff --git a/vcmiinstall.sh b/vcmiinstall.sh index f1e9bbb3b..6e0dc6147 100644 --- a/vcmiinstall.sh +++ b/vcmiinstall.sh @@ -14,7 +14,7 @@ function incusage(){ exit } -if [ "$1" == "reconf" ]; then +if [ "$1" = "reconf" ]; then cd vcmi autoreconf -i cd .. @@ -37,22 +37,22 @@ if [ "$1" == "--install" ]; then errorcheck "fetching sources" cd vcmi - elif [ "$2" = "lean" ]; then + if [ "$2" = "lean" ]; then mv "Makefile without client.am" Makefile.am mv "configure without client.ac" configure.ac rm client/Makefile.am echo "SUBDIRS = StupidAI" > AI/Makefile.am rm -rf AI/EmptyAI rm -rf AI/GeniusAI - find . -name ".svn" -exec rm -rf {} \; + #find . -name ".svn" -exec rm -rf {} \; elif [ "$2" = "full" ]; then mv "Makefile with client.am" Makefile.am mv "configure with client.ac" configure.ac else incusage fi - autoreconf -i - errorcheck "autoreconf -i" + autoreconf -f + errorcheck "autoreconf -f" cd .. vcmi/configure --datadir=`pwd` --bindir=`pwd`vcmi --libdir=`pwd` errorcheck "configure"