summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-12-22 23:05:12 +0000
committerChris Wilson <chris+github@qwirx.com>2014-12-22 23:05:12 +0000
commite88418c0145ddeba97116e49074dd8e2e9edea7a (patch)
tree889048dff35024f2403e9360d7e7884cf79d696f /lib
parenta6f52d5d593a0ebe16326b04df367ede82c9511e (diff)
Make memleakfinder_setup_exit_report() take a std::string, for C++ style.
Diffstat (limited to 'lib')
-rw-r--r--lib/common/DebugMemLeakFinder.cpp5
-rw-r--r--lib/common/MemLeakFinder.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/common/DebugMemLeakFinder.cpp b/lib/common/DebugMemLeakFinder.cpp
index a7d87528..d2109d7b 100644
--- a/lib/common/DebugMemLeakFinder.cpp
+++ b/lib/common/DebugMemLeakFinder.cpp
@@ -586,9 +586,10 @@ extern "C" void memleakfinder_atexit()
memleakfinder_reportleaks_appendfile(atexit_filename, atexit_markertext);
}
-void memleakfinder_setup_exit_report(const char *filename, const char *markertext)
+void memleakfinder_setup_exit_report(const std::string& filename,
+ const char *markertext)
{
- ::strncpy(atexit_filename, filename, sizeof(atexit_filename)-1);
+ ::strncpy(atexit_filename, filename.c_str(), sizeof(atexit_filename)-1);
::strncpy(atexit_markertext, markertext, sizeof(atexit_markertext)-1);
atexit_filename[sizeof(atexit_filename)-1] = 0;
atexit_markertext[sizeof(atexit_markertext)-1] = 0;
diff --git a/lib/common/MemLeakFinder.h b/lib/common/MemLeakFinder.h
index 1a2cf90c..3beedbe9 100644
--- a/lib/common/MemLeakFinder.h
+++ b/lib/common/MemLeakFinder.h
@@ -43,7 +43,7 @@ void memleakfinder_reportleaks();
void memleakfinder_reportleaks_appendfile(const char *filename, const char *markertext);
-void memleakfinder_setup_exit_report(const char *filename, const char *markertext);
+void memleakfinder_setup_exit_report(const std::string& filename, const char *markertext);
void memleakfinder_startsectionmonitor();