citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit 2143d40b1a1d823ffa02e04a36dc2bcee5381c90
parent a663b02cfd292564c901a3560871fdcf9d6ff62c
Author: Kyle Milz <kyle@0x30.net>
Date:   Wed, 15 Jun 2016 23:05:50 -0600

src: replace dashes with underscores of filename

Diffstat:
Msrc/inst_action.cc | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/inst_action.cc b/src/inst_action.cc @@ -40,8 +40,9 @@ get_current_node(std::string const &file_path) size_t last_slash = file_path.find_last_of('/'); std::string fn(file_path.substr(last_slash + 1)); - size_t period = fn.find_first_of('.'); + std::replace(fn.begin(), fn.end(), '-', '_'); + size_t period = fn.find_first_of('.'); return fn.substr(0, period); }