Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
feat: avoid useless str copy
Browse files Browse the repository at this point in the history
  • Loading branch information
smartcmd committed Jan 26, 2024
1 parent 50df23f commit deb5d2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#include <mc/deps/core/utility/BinaryStream.h>

namespace plugin {
bool folderExists(std::string folderName) {
bool folderExists(const std::string& folderName) {
struct stat info{};
if (stat(folderName.c_str(), &info) != 0) {
return false;
Expand All @@ -68,7 +68,7 @@ namespace plugin {
}
}

void createFolder(const ll::Logger &logger, const std::string folderName) {
void createFolder(const ll::Logger &logger, const std::string &folderName) {
int result = _mkdir(folderName.c_str());
if (result != 0) {
logger.error("Failed to create folder.");
Expand Down

0 comments on commit deb5d2f

Please sign in to comment.