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

Codechange: Remove using namespace std; #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PeterN
Copy link
Member

@PeterN PeterN commented Sep 4, 2024

using namespace std; is bad practice, so don't.

Reference std:: explicitly where it is used.

Reference `std::` explicitly where it is used.
Copy link
Contributor

@glx22 glx22 left a comment

Choose a reason for hiding this comment

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

I think I fix all comments needing it.

@@ -92,12 +91,12 @@ char FD takes the same type of parameter as r, but adds that value to the
char FE as above
char C0 means to insert a linebreak (as if encountering C1..C4) but without
reading any bytes
A backslash is used to escape nulls that are not end-of-string characters
A backslash is used to escape nulls that are not end-of-std::string characters
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
A backslash is used to escape nulls that are not end-of-std::string characters
A backslash is used to escape nulls that are not end-of-string characters

* characters as bytes and construct a host endian ordered integer.
* Consequently, there is no need to swap endian for the read data; it
* characters as bytes and construct a host endian ordered integer.
* Consequently, there is no need to std::swap endian for the read data; it
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Consequently, there is no need to std::swap endian for the read data; it
* Consequently, there is no need to swap endian for the read data; it

// But I can't, so I have to manually generate the string instead.
void Act5CountWarn(const vector<int>&sizes){
string str = mysprintf("%S",ACT5_SIZE, sizes[1], sizes[1]);
// But I can't, so I have to manually generate the std::string instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// But I can't, so I have to manually generate the std::string instead.
// But I can't, so I have to manually generate the string instead.

@@ -208,9 +207,9 @@ static const char _datTextIDs[]="\x04\x09"
"\x08\x01\x6C\x00\x38\x00\x43\x00\x44\x00\x00\x00\x06\x00\x00\x00"
//-C000- -D000- -E000- -F000-
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x4D\x00\x00\x00\x00\x00\x9B\x01"
// Number of special string ID ranges:
// Number of special std::string ID ranges:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Number of special std::string ID ranges:
// Number of special string ID ranges:

"\x03"
// High bytes of special string IDs:
// High bytes of special std::string IDs:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// High bytes of special std::string IDs:
// High bytes of special string IDs:

@@ -460,7 +459,7 @@ NDF_END
#define DWORD 0x04

/* Formatting */
#define QUOTED 0x10 /* Quoted string */
#define QUOTED 0x10 /* Quoted std::string */
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#define QUOTED 0x10 /* Quoted std::string */
#define QUOTED 0x10 /* Quoted string */

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.

2 participants