mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-12 03:36:42 +00:00
Added constructor and destructor to Dialogue, thus fixing a long standing leak.
svn-id: r32757
This commit is contained in:
parent
4e2e46f16c
commit
d2609258cc
@ -207,6 +207,16 @@ uint16 Zone::height() const {
|
|||||||
return _bottom - _top;
|
return _bottom - _top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Dialogue::Dialogue() {
|
||||||
|
memset(_questions, 0, sizeof(_questions));
|
||||||
|
}
|
||||||
|
|
||||||
|
Dialogue::~Dialogue() {
|
||||||
|
for (int i = 0; i < NUM_QUESTIONS; i++) {
|
||||||
|
delete _questions[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Answer::Answer() {
|
Answer::Answer() {
|
||||||
_text = NULL;
|
_text = NULL;
|
||||||
_mood = 0;
|
_mood = 0;
|
||||||
|
@ -181,6 +181,9 @@ struct Question {
|
|||||||
|
|
||||||
struct Dialogue {
|
struct Dialogue {
|
||||||
Question *_questions[NUM_QUESTIONS];
|
Question *_questions[NUM_QUESTIONS];
|
||||||
|
|
||||||
|
Dialogue();
|
||||||
|
~Dialogue();
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GetData { // size = 24
|
struct GetData { // size = 24
|
||||||
|
Loading…
x
Reference in New Issue
Block a user