operator bool for Bytecode objects

master
Daniel Kolesa 2015-12-20 00:21:19 +01:00
parent 79f2db1f54
commit 6bcd53c51a
1 changed files with 1 additions and 0 deletions

View File

@ -494,6 +494,7 @@ struct Bytecode {
return *this;
}
operator bool() const { return p_code != nullptr; }
operator ostd::Uint32 *() const { return p_code; }
private:
ostd::Uint32 *p_code;