Skip to content

Commit 88ea6be

Browse files
committed
修复一些问题
1 parent 246b26a commit 88ea6be

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

CodeFormat/src/LuaWorkspaceFormat.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@ bool LuaWorkspaceFormat::SetConfigPath(std::string_view config)
2929

3030
void LuaWorkspaceFormat::AddIgnoresByFile(std::string_view gitIgnoreFile)
3131
{
32-
std::fstream fin(gitIgnoreFile, std::ios::in);
32+
std::fstream fin(std::string(gitIgnoreFile), std::ios::in);
3333
if (fin.is_open())
3434
{
3535
std::string line;
36-
while (!fin.eof()) {
36+
while (!fin.eof())
37+
{
3738
std::getline(fin, line);
3839
auto newLine = StringUtil::TrimSpace(line);
39-
if(!StringUtil::StartWith(newLine, "#"))
40+
if (!StringUtil::StartWith(newLine, "#"))
4041
{
4142
_ignorePattern.push_back(std::string(newLine));
4243
}
@@ -78,7 +79,7 @@ void LuaWorkspaceFormat::ReformatWorkspace()
7879
finder.AddIgnoreDirectory(".idea");
7980
finder.AddIgnoreDirectory(".vs");
8081
finder.AddIgnoreDirectory(".vscode");
81-
for(auto pattern: _ignorePattern)
82+
for (auto pattern : _ignorePattern)
8283
{
8384
finder.AddignorePatterns(pattern);
8485
}

0 commit comments

Comments
 (0)