diff --git a/library/Process-linux.cpp b/library/Process-linux.cpp index 7a72171ca..fa06d28e4 100644 --- a/library/Process-linux.cpp +++ b/library/Process-linux.cpp @@ -176,22 +176,6 @@ int Process::adjustOffset(int offset, bool /*to_file*/) return offset; } -static int getdir (string dir, vector &files) -{ - DIR *dp; - struct dirent *dirp; - if((dp = opendir(dir.c_str())) == NULL) - { - cout << "Error(" << errno << ") opening " << dir << endl; - return errno; - } - while ((dirp = readdir(dp)) != NULL) { - files.push_back(string(dirp->d_name)); - } - closedir(dp); - return 0; -} - uint32_t Process::getTickCount() { struct timeval tp; diff --git a/library/modules/EventManager.cpp b/library/modules/EventManager.cpp index 8ce2c97f4..92a4f3f94 100644 --- a/library/modules/EventManager.cpp +++ b/library/modules/EventManager.cpp @@ -395,10 +395,10 @@ static void manageJobInitiatedEvent(color_ostream& out) { } //helper function for manageJobCompletedEvent -static int32_t getWorkerID(df::job* job) { - auto ref = findRef(job->general_refs, general_ref_type::UNIT_WORKER); - return ref ? ref->getID() : -1; -} +//static int32_t getWorkerID(df::job* job) { +// auto ref = findRef(job->general_refs, general_ref_type::UNIT_WORKER); +// return ref ? ref->getID() : -1; +//} /* TODO: consider checking item creation / experience gain just in case @@ -1150,7 +1150,7 @@ static void manageInteractionEvent(color_ostream& out) { df::report* lastAttackEvent = NULL; df::unit* lastAttacker = NULL; - df::unit* lastDefender = NULL; + //df::unit* lastDefender = NULL; unordered_map > history; for ( ; a < reports.size(); a++ ) { df::report* report = reports[a]; @@ -1164,7 +1164,7 @@ static void manageInteractionEvent(color_ostream& out) { if ( attack ) { lastAttackEvent = report; lastAttacker = NULL; - lastDefender = NULL; + //lastDefender = NULL; } vector relevantUnits = gatherRelevantUnits(out, lastAttackEvent, report); InteractionData data = getAttacker(out, lastAttackEvent, lastAttacker, attack ? NULL : report, relevantUnits); @@ -1201,7 +1201,7 @@ static void manageInteractionEvent(color_ostream& out) { } //out.print("%s,%d\n",__FILE__,__LINE__); lastAttacker = df::unit::find(data.attacker); - lastDefender = df::unit::find(data.defender); + //lastDefender = df::unit::find(data.defender); //fire event for ( auto b = copy.begin(); b != copy.end(); b++ ) { EventHandler handle = (*b).second;