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

Use std::string in LogContainer's constructor. #464

Merged
merged 1 commit into from
Jun 5, 2014

Conversation

lioncash
Copy link
Member

@lioncash lioncash commented Jun 5, 2014

This allows for removal of the strcpy calls, also it's technically way more safe, though I doubt we'll ever have a log name larger than 128 characters or a short description larger than 32 characters. Moved these assignments into the constructor's initializer list.

Also changed the file logger to take a string instead of const char*. Kills off a c_str call.

@Tilka
Copy link
Member

Tilka commented Jun 5, 2014

lgtm

: m_enable(enable)
LogContainer::LogContainer(const std::string& shortName, const std::string& fullName, bool enable)
: m_fullName(fullName),
m_shortName(shortName),

This comment was marked as off-topic.

This allows for removal of the strcpy calls, also it's technically way more safe, though I doubt we'll ever have a log name larger than 128 characters or a short description larger than 32 characters.

Also moved these assignments into the constructor's initializer list.
@lioncash
Copy link
Member Author

lioncash commented Jun 5, 2014

@delroth Fixed the alignments.

delroth added a commit that referenced this pull request Jun 5, 2014
Use std::string in LogContainer's constructor.
@delroth delroth merged commit 7ffea5d into dolphin-emu:master Jun 5, 2014
@lioncash lioncash deleted the log-str branch June 5, 2014 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants