Nuke nearly all of the unused local variables

This commit is contained in:
2014-04-15 02:54:16 -04:00
parent e73d14e0ee
commit 2b924101d6
22 changed files with 17 additions and 95 deletions

View File

@@ -177,7 +177,6 @@ void cControl::setActive(bool active) {
bool cControl::handleClick(){
sf::Event e;
unsigned long dummy;
bool done = false, clicked = false;
inWindow->setActive();
depressed = true;
@@ -274,13 +273,6 @@ bool cControl::triggerFocusHandler(cDialog& me __attribute__((unused)), std::str
std::string cControl::font_nums[4] = {"Dungeon", "Geneva", "Silom", "MaidenWord"};
void cControl::init(){
char fnGeneva[] = "Geneva";
char fnDungeon[] = "Dungeon Bold";
char fnMaiden[] = "MaidenWord";
char fnSilom[] = "Silom";
char fnPalatino[] = "Palatino";
char fnChancery[] = "Apple Chancery";
// Check if Silom is available
// TODO: Ultimately, I'd like to distribute all needed fonts with the game, rendering this unnecessary
try {

View File

@@ -1134,7 +1134,6 @@ bool cDialog::addLabelFor(std::string key, std::string label, eLabelPos where, s
}
std::string cDialog::process_keystroke(cKey keyHit){
unsigned long dummy;
ctrlIter iter = controls.begin();
while(iter != controls.end()){
if(iter->second->getType() == CTRL_FIELD && iter->second->isVisible() && dynamic_cast<cTextField*>(iter->second)->hasFocus()) {

View File

@@ -107,6 +107,7 @@ void cTextField::draw(){
selectRect.left += sel_start;
selectRect.right = selectRect.left + sel_width;
fill_rect(*inWindow, selectRect, ipClr);
// TODO: I forget whether this was supposed to be = or -=
selectRect.right - 1;
fill_rect(*inWindow, selectRect, hiliteClr);
} else if(ip_timer.getElapsedTime().asMilliseconds() < 500) {