Skip to content

Commit

Permalink
fix performance issue from coverity
Browse files Browse the repository at this point in the history
  • Loading branch information
pit-ray committed Oct 8, 2023
1 parent 95f962b commit 4a12819
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/bind/syscmd/autocmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ namespace vind

auto [event_str, patcmd] = core::extract_double_args(pargs) ;
auto [pattern, cmd] = core::extract_double_args(patcmd) ;
auto patterns = util::split(pattern, ",") ;
auto patterns = util::split(std::move(pattern), ",") ;

if(event_str == "*") {
if(patterns.empty()) {
Expand Down
2 changes: 1 addition & 1 deletion src/bind/window/arrange_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ namespace vind
auto& settable = core::SetTable::get_instance() ;
auto str = settable.get("arrangewin_ignore").get<std::string>() ;

auto modules = util::split(str, ",") ;
auto modules = util::split(std::move(str), ",") ;
for(auto& m : modules) {
g_ignores.insert(util::A2a(util::trim(m))) ;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/version.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef _VERSION_HPP
#define _VERSION_HPP

#define WIN_VIND_VERSION "5.3.0.0"
#define WIN_VIND_VERSION "5.4.0.0"

#endif
2 changes: 1 addition & 1 deletion src/opt/optionlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace vind

Option::SPtr ref_global_options_byname(std::string&& name) {
for(auto& opt : all_global_options()) {
if(opt->name() == util::A2a(name)) {
if(opt->name() == util::A2a(std::move(name))) {
return opt ;
}
}
Expand Down

0 comments on commit 4a12819

Please sign in to comment.