Commit f9a8f766 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[2375] Use safety measures

A scoped pointer, in this case. It probably isn't safer, as the ->handle
couldn't throw in this case, but just for the habit.
parent 20897c86
......@@ -178,9 +178,9 @@ TEST_F(MasterLexerTest, tokenFromStart) {
// We don't have access directly inside the implementation.
// We get the fake state, run it to install the token.
// Then we just delete it ourself and return NULL.
State* state(State::getFakeState(NULL, 0, &token_));
scoped_ptr<const State> state(State::getFakeState(NULL, 0,
&token_));
state->handle(*this);
delete state;
return (NULL);
}
private:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment