-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Added 'const' or '&' to arguments when needed. #32
Conversation
QFile file(fileName); | ||
return file.remove(); | ||
} | ||
|
||
bool AnalysisDao::saveDataToFile(QString fileName, QByteArray data) const { | ||
bool AnalysisDao::saveDataToFile(const QString& fileName, QByteArray& data) const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool AnalysisDao::saveDataToFile(const QString& fileName, const QByteArray& data) const {
If track ID List is not used by the callers afterwards, use pointer; output parameters are at the end of the parameter list.
LGTM! Thank you. Please note: There is no notification send out if you add a commit. So please write a "finish" comment when you think you are finished. This way the possible reviewers will be informed. |
Added 'const' or '&' to arguments when needed.
Thank you, @daschuer. I'll write "finish" every time henceforward. |
add AutoDJ icons
Configuration updates
I was learning DAO's code. I found that it would be more simpler to understand code if there are const qualifiers for function arguments. Also, in this way we can avoid some errors and help compiler.
About references -- whenever we don't need object's copy -- we just use it's reference.