Remove or comment out unused code.

develop
Ben Lubar 2018-04-05 16:48:11 -05:00
parent 2eec5ee78d
commit 0a2ec30199
No known key found for this signature in database
GPG Key ID: 018BAB45DB2D2B24
2 changed files with 7 additions and 23 deletions

@ -176,22 +176,6 @@ int Process::adjustOffset(int offset, bool /*to_file*/)
return offset; return offset;
} }
static int getdir (string dir, vector<string> &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() uint32_t Process::getTickCount()
{ {
struct timeval tp; struct timeval tp;

@ -395,10 +395,10 @@ static void manageJobInitiatedEvent(color_ostream& out) {
} }
//helper function for manageJobCompletedEvent //helper function for manageJobCompletedEvent
static int32_t getWorkerID(df::job* job) { //static int32_t getWorkerID(df::job* job) {
auto ref = findRef(job->general_refs, general_ref_type::UNIT_WORKER); // auto ref = findRef(job->general_refs, general_ref_type::UNIT_WORKER);
return ref ? ref->getID() : -1; // return ref ? ref->getID() : -1;
} //}
/* /*
TODO: consider checking item creation / experience gain just in case 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::report* lastAttackEvent = NULL;
df::unit* lastAttacker = NULL; df::unit* lastAttacker = NULL;
df::unit* lastDefender = NULL; //df::unit* lastDefender = NULL;
unordered_map<int32_t,unordered_set<int32_t> > history; unordered_map<int32_t,unordered_set<int32_t> > history;
for ( ; a < reports.size(); a++ ) { for ( ; a < reports.size(); a++ ) {
df::report* report = reports[a]; df::report* report = reports[a];
@ -1164,7 +1164,7 @@ static void manageInteractionEvent(color_ostream& out) {
if ( attack ) { if ( attack ) {
lastAttackEvent = report; lastAttackEvent = report;
lastAttacker = NULL; lastAttacker = NULL;
lastDefender = NULL; //lastDefender = NULL;
} }
vector<df::unit*> relevantUnits = gatherRelevantUnits(out, lastAttackEvent, report); vector<df::unit*> relevantUnits = gatherRelevantUnits(out, lastAttackEvent, report);
InteractionData data = getAttacker(out, lastAttackEvent, lastAttacker, attack ? NULL : report, relevantUnits); 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__); //out.print("%s,%d\n",__FILE__,__LINE__);
lastAttacker = df::unit::find(data.attacker); lastAttacker = df::unit::find(data.attacker);
lastDefender = df::unit::find(data.defender); //lastDefender = df::unit::find(data.defender);
//fire event //fire event
for ( auto b = copy.begin(); b != copy.end(); b++ ) { for ( auto b = copy.begin(); b != copy.end(); b++ ) {
EventHandler handle = (*b).second; EventHandler handle = (*b).second;