-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix the issue regarding "Clean up code: .str().length() #2577" #1
Conversation
…4.1 (tags/RELEASE_600/final)
… fix/negative-indexing
…4.1 (tags/RELEASE_600/final)
…4.1 (tags/RELEASE_600/final)
… fix/negative-indexing
…4.1 (tags/RELEASE_600/final)
Fix assign and lvalue to return 0 row/col/size objects for negative indexing
Note: |
Submission Checklist
./runTests.py src/test/unit
make cpplint
Summary
This fixes stan-dev#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: