[ion] Fix tools

Change-Id: I97b3770993adfd1b98b2eee24f9d3005842d8093
This commit is contained in:
Romain Goyet
2017-05-03 17:06:12 +02:00
parent e32a5d248d
commit 8564d67efd
2 changed files with 2 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ void writeEventsToFile(std::ofstream & file, int numberOfEvents, std::mt19937 &
while (i > 0) {
int prEventId = distribution(rng);
Ion::Events::Event e(prEventId);
if (e.isValid() && e != Ion::Events::Termination) {
if (e.isDefined() && e != Ion::Events::Termination) {
i--;
file << (unsigned char)(prEventId);
}

View File

@@ -6,7 +6,7 @@ int main(int argc, char * argv[]) {
unsigned char c = 0;
while (std::cin >> c) {
Ion::Events::Event event(c);
if (event.isValid()) {
if (event.isDefined()) {
if (event.name() == nullptr) {
std::cerr << "*** UNNAMED(" << (int)c << ") ***" << std::endl;
} else {