From 08e094748c9964d35331b99aa5a0c3204b232202 Mon Sep 17 00:00:00 2001 From: Justin Viiret Date: Thu, 29 Jun 2017 13:09:16 +1000 Subject: [PATCH] mpv_dump: use StdioFile --- src/nfa/mpv_dump.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/nfa/mpv_dump.cpp b/src/nfa/mpv_dump.cpp index 9a8a4067..4979395d 100644 --- a/src/nfa/mpv_dump.cpp +++ b/src/nfa/mpv_dump.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2016, Intel Corporation + * Copyright (c) 2015-2017, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -132,7 +132,7 @@ void dumpCounter(FILE *f, const mpv_counter_info *c) { void nfaExecMpv_dump(const NFA *nfa, const string &base) { const mpv *m = (const mpv *)getImplNfa(nfa); - FILE *f = fopen_or_throw((base + ".txt").c_str(), "w"); + StdioFile f(base + ".txt", "w"); fprintf(f, "Puff the Magic Engines\n"); fprintf(f, "\n"); @@ -154,7 +154,6 @@ void nfaExecMpv_dump(const NFA *nfa, const string &base) { } dumpTextReverse(nfa, f); - fclose(f); } } // namespace ue2