local instructions
This commit is contained in:
+2
-4
@@ -60,7 +60,7 @@ bool Person::operator==(const Person &other)const
|
||||
|
||||
void Person::displayInfo()const
|
||||
{
|
||||
WINDOW* info_tab = newwin(LINES, COLS, 0, 0);
|
||||
AutoWin info_tab( newwin(LINES, COLS, 0, 0) );
|
||||
|
||||
waddstr(info_tab, name.data());
|
||||
waddch(info_tab,'\n');
|
||||
@@ -78,7 +78,6 @@ void Person::displayInfo()const
|
||||
|
||||
werase(info_tab);
|
||||
wrefresh(info_tab); /* todo: dont update */
|
||||
delwin(info_tab);
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +117,7 @@ U16 Person::draw(const I16 drawY, const I16 drawX, bool selected, bool hasSpouse
|
||||
|
||||
if(willBeVisible(drawY, drawX, BOX_HEIGHT, width))
|
||||
{
|
||||
WINDOW* pad = newpad(BOX_HEIGHT, width);
|
||||
AutoWin pad( newpad(BOX_HEIGHT, width) );
|
||||
|
||||
auto color_pair = COLOR_PAIR( selected ? COLOR_SELECTED
|
||||
: (sex==M ? COLOR_MALE : COLOR_FEMALE) );
|
||||
@@ -138,7 +137,6 @@ U16 Person::draw(const I16 drawY, const I16 drawX, bool selected, bool hasSpouse
|
||||
/* wattroff(pad, color_pair); */
|
||||
|
||||
drawpad(pad, drawY, drawX);
|
||||
delwin(pad);
|
||||
}
|
||||
return width;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user