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

Removed duplicate instances of str().length() #3097

Conversation

AnikaAChowdhury
Copy link

@AnikaAChowdhury AnikaAChowdhury commented Jan 29, 2022

Submission Checklist

  • Run unit tests: ./runTests.py src/test/unit
  • Run cpplint: make cpplint
  • Declare copyright holder and open-source license: see below

Summary

This fixes #2577 which is cleaning up code instances that has .str().length() for logger.info(). This cleans up a lot of "if (msg.str().length() > 0)" instances from the code block that follows
if (msg.str().length() > 0)
logger.info(msg);
patterns. However, there are still a lot of instances "if (msg.str().length() > 0)" left because it was connected with another logger implementation beside logger.info(). Therefore, some of the instances of that could not be removed.

Intended Effect

Removes a lot of duplicate codes.

How to Verify

Need to run tests on the existing testing library (In Progress).

Side Effects

Followed @WardBrian's suggestions.

Documentation

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

@AnikaAChowdhury AnikaAChowdhury deleted the codeCleanUp/issue-2577-cleaning-up-str-length branch January 29, 2022 19:17
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.

Clean up code: .str().length()
3 participants