From 83047cdae7c8e57c55d68f30e747669b358de33f Mon Sep 17 00:00:00 2001 From: Maksim Andrianov Date: Tue, 25 Jun 2019 14:55:45 +0300 Subject: [PATCH] Optimization step 'generate_features': Added overloading for GetNameFromFullPath. --- base/file_name_utils.cpp | 6 ++++++ base/file_name_utils.hpp | 2 ++ 2 files changed, 8 insertions(+) diff --git a/base/file_name_utils.cpp b/base/file_name_utils.cpp index 95c18480ab..b66b19b1d3 100644 --- a/base/file_name_utils.cpp +++ b/base/file_name_utils.cpp @@ -32,6 +32,12 @@ void GetNameFromFullPath(string & name) name = name.substr(i+1); } +std::string GetNameFromFullPath(std::string const & path) +{ + std::string name; + GetNameFromFullPath(name); +} + string GetNameFromFullPathWithoutExt(string const & path) { string name = path; diff --git a/base/file_name_utils.hpp b/base/file_name_utils.hpp index 83424b14dd..287abbc773 100644 --- a/base/file_name_utils.hpp +++ b/base/file_name_utils.hpp @@ -15,6 +15,8 @@ std::string GetFileExtension(std::string const & name); /// Get file name from full path. void GetNameFromFullPath(std::string & name); +std::string GetNameFromFullPath(std::string const & path); + /// Get file name from full path without extension. std::string GetNameFromFullPathWithoutExt(std::string const & path);