-
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
Removed a_ prefix on arguments #2513
Conversation
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.
One question: @bocchino many functions where implemented in the header as opposed to the CPP. Does this match the C++ style we use?
@@ -19,17 +19,17 @@ | |||
namespace Fw { | |||
|
|||
void FilePacket::PathName :: | |||
initialize(const char *const a_value) | |||
initialize(const char *const value) |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
const char *const a_sourcePath, | ||
const char *const a_destinationPath | ||
const U32 fileSize, | ||
const char *const sourcePath, |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
const char *const a_destinationPath | ||
const U32 fileSize, | ||
const char *const sourcePath, | ||
const char *const destinationPath |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
}; | ||
|
||
//! Get the path name value | ||
const char* getValue(void) const { |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
|
||
//! Pointer to the path value | ||
const char *value; | ||
const char *m_value; |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
if (status != Os::File::OP_OK) | ||
return status; | ||
|
||
NATIVE_INT_TYPE intSize = a_size; | ||
status = this->osFile.read(data, intSize); | ||
NATIVE_INT_TYPE intSize = size; |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
@@ -291,7 +354,7 @@ | |||
// Constructor | |||
// ---------------------------------------------------------------------- | |||
|
|||
FilePacket() { this->m_header.type = T_NONE; } | |||
FilePacket() { this->m_header.m_type = T_NONE; } |
Check notice
Code scanning / CodeQL
More than one statement per line Note
@@ -77,23 +77,21 @@ | |||
public: | |||
|
|||
//! Constructor | |||
File() : size(0) { } | |||
File() : m_size(0) { } |
Check notice
Code scanning / CodeQL
More than one statement per line Note
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.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Function implementations in the header file are fine if they are short functions or they are part of a template. |
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.
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.
Looks good!
Change Description
Removed the prefix
_a
previously added in #2482Changes:
Changed public variables of
Fw/FilePacket
andSvc/FileDownlink
toPRIVATE
variablesChanged public variable
name
to private variablem_name
inSTest/STest/Rule/Rule.hpp
Remove object initializion using public variable list in
Svc/FileDownlink/FileDownlink.cpp
andFw/FilePacket/StartPacket.cpp
Added getters for variables new private variables
The getters have been implemented in the header. Sometimes using references, sometimes copying values.
If it is not standard, I am happy to update it.
Fixed UT
Rationale
The
a_
prefix should not be used for argumentsTesting/Review Recommendations
I am not sure if there are some breaking changes for other projects