From 1e8c2ff5232f164724c1da3f4e31ee5a926ad2e9 Mon Sep 17 00:00:00 2001 From: Marianne Gagnon Date: Sun, 16 Feb 2014 18:10:29 -0500 Subject: [PATCH] Use plain ofstream to write profiler CSV --- src/utils/profiler.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils/profiler.cpp b/src/utils/profiler.cpp index 49eec4f61..7f817dd29 100644 --- a/src/utils/profiler.cpp +++ b/src/utils/profiler.cpp @@ -21,13 +21,13 @@ #include "guiengine/event_handler.hpp" #include "guiengine/engine.hpp" #include "guiengine/scalable_font.hpp" -#include "io/xml_writer.hpp" #include "utils/vs.hpp" #include #include #include #include +#include Profiler profiler; @@ -100,8 +100,9 @@ void Profiler::setCaptureReport(bool captureReport) { // when disabling capture to file, flush captured data to a file { - XMLWriter writer(file_manager->getUserConfigFile("profiling.csv").c_str()); - writer << m_capture_report_buffer->getRawBuffer(); + std::ofstream filewriter(file_manager->getUserConfigFile("profiling.csv").c_str(), std::ios::out | std::ios::binary); + const char* str = m_capture_report_buffer->getRawBuffer(); + filewriter.write(str, strlen(str)); } m_capture_report = false; delete m_capture_report_buffer;