aboutsummaryrefslogtreecommitdiff
path: root/src/timelineDecoder/JSONTimelineDecoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/timelineDecoder/JSONTimelineDecoder.cpp')
-rw-r--r--src/timelineDecoder/JSONTimelineDecoder.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/timelineDecoder/JSONTimelineDecoder.cpp b/src/timelineDecoder/JSONTimelineDecoder.cpp
index 520995afe9..84472d8c99 100644
--- a/src/timelineDecoder/JSONTimelineDecoder.cpp
+++ b/src/timelineDecoder/JSONTimelineDecoder.cpp
@@ -8,6 +8,7 @@
#include <string>
#include <fstream>
+#include <boost/filesystem/fstream.hpp>
namespace armnn
{
@@ -245,9 +246,9 @@ void JSONTimelineDecoder::JSONEntity::SetParent(JSONEntity& parent)
void JSONTimelineDecoder::PrintJSON(JSONTimelineDecoder::JSONEntity& rootEntity)
{
std::string jsonString = GetJSONString(rootEntity);
- std::ofstream outfile;
- outfile.open(this->outputJSONFile);
- outfile << jsonString;
+ boost::filesystem::ofstream ofs{this->outputJSONFile};
+ ofs << jsonString;
+ ofs.close();
}
std::string JSONTimelineDecoder::GetJSONString(JSONTimelineDecoder::JSONEntity& rootEntity)