Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some bug fixes and very minor refactoring #930

Merged
merged 3 commits into from
Apr 25, 2023

Conversation

T00fy
Copy link
Contributor

@T00fy T00fy commented Apr 18, 2023

No description provided.

Copy link
Member

@hkAlice hkAlice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for the PR, looks good - just some comments on coding style

@@ -144,6 +144,11 @@ std::string readFileToString( const std::string& filename )
// Close the file
file.close();

// Remove all newlines from the file contents
fileContents.erase(std::remove(fileContents.begin(), fileContents.end(), '\n'), fileContents.end());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we use whitespaces within parentheses
-> fileContents.erase( std::remove( fileContents.begin(), fileContents.end(), '\n' ), fileContents.end() );

@@ -144,6 +144,11 @@ std::string readFileToString( const std::string& filename )
// Close the file
file.close();

// Remove all newlines from the file contents
fileContents.erase(std::remove(fileContents.begin(), fileContents.end(), '\n'), fileContents.end());
fileContents.erase(std::remove(fileContents.begin(), fileContents.end(), '\r'), fileContents.end());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

likewise here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@T00fy T00fy requested a review from hkAlice April 23, 2023 15:44
@SapphireMordred SapphireMordred merged commit e7cfe87 into SapphireServer:master Apr 25, 2023
IceyMint pushed a commit to IceyMint/Sapphire that referenced this pull request Sep 8, 2024
Some bug fixes and very minor refactoring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants