Skip to content

cppcheck: fix passedByValue (part 1)#61

Merged
caolanm merged 1 commit intotdf:masterfrom
serval2412:passedByValue_1
Mar 3, 2024
Merged

cppcheck: fix passedByValue (part 1)#61
caolanm merged 1 commit intotdf:masterfrom
serval2412:passedByValue_1

Conversation

@serval2412
Copy link
Contributor

src/libcmis/ws-versioningservice.cxx:70:58: performance: Function parameter 'repoId' should be passed by const reference. [passedByValue]
src/libcmis/ws-versioningservice.cxx:70:73: performance: Function parameter 'documentId' should be passed by const reference. [passedByValue]
src/libcmis/ws-versioningservice.cxx:91:48: performance: Function parameter 'repoId' should be passed by const reference. [passedByValue]
src/libcmis/ws-versioningservice.cxx:91:63: performance: Function parameter 'documentId' should be passed by const reference. [passedByValue]
src/libcmis/ws-versioningservice.cxx:121:74: performance: Function parameter 'repoId' should be passed by const reference. [passedByValue]
src/libcmis/ws-versioningservice.cxx:121:89: performance: Function parameter 'objectId' should be passed by const reference. [passedByValue]
src/libcmis/xml-utils.cxx:344:63: performance: Function parameter 'req' should be passed by const reference. [passedByValue]
src/libcmis/xml-utils.cxx:390:52: performance: Function parameter 'dateTimeStr' should be passed by const reference. [passedByValue]
src/libcmis/xml-utils.cxx:469:28: performance: Function parameter 'boolStr' should be passed by const reference. [passedByValue]
src/libcmis/xml-utils.cxx:481:31: performance: Function parameter 'intStr' should be passed by const reference. [passedByValue]
src/libcmis/xml-utils.cxx:500:32: performance: Function parameter 'doubleStr' should be passed by const reference. [passedByValue]
src/libcmis/xml-utils.cxx:562:27: performance: Function parameter 'str' should be passed by const reference. [passedByValue]
src/libcmis/xml-utils.cxx:568:29: performance: Function parameter 'str' should be passed by const reference. [passedByValue]

src/libcmis/ws-versioningservice.cxx:70:58: performance: Function parameter 'repoId' should be passed by const reference. [passedByValue]
src/libcmis/ws-versioningservice.cxx:70:73: performance: Function parameter 'documentId' should be passed by const reference. [passedByValue]
src/libcmis/ws-versioningservice.cxx:91:48: performance: Function parameter 'repoId' should be passed by const reference. [passedByValue]
src/libcmis/ws-versioningservice.cxx:91:63: performance: Function parameter 'documentId' should be passed by const reference. [passedByValue]
src/libcmis/ws-versioningservice.cxx:121:74: performance: Function parameter 'repoId' should be passed by const reference. [passedByValue]
src/libcmis/ws-versioningservice.cxx:121:89: performance: Function parameter 'objectId' should be passed by const reference. [passedByValue]
src/libcmis/xml-utils.cxx:344:63: performance: Function parameter 'req' should be passed by const reference. [passedByValue]
src/libcmis/xml-utils.cxx:390:52: performance: Function parameter 'dateTimeStr' should be passed by const reference. [passedByValue]
src/libcmis/xml-utils.cxx:469:28: performance: Function parameter 'boolStr' should be passed by const reference. [passedByValue]
src/libcmis/xml-utils.cxx:481:31: performance: Function parameter 'intStr' should be passed by const reference. [passedByValue]
src/libcmis/xml-utils.cxx:500:32: performance: Function parameter 'doubleStr' should be passed by const reference. [passedByValue]
src/libcmis/xml-utils.cxx:562:27: performance: Function parameter 'str' should be passed by const reference. [passedByValue]
src/libcmis/xml-utils.cxx:568:29: performance: Function parameter 'str' should be passed by const reference. [passedByValue]
@caolanm caolanm merged commit ca038cf into tdf:master Mar 3, 2024
@serval2412 serval2412 deleted the passedByValue_1 branch March 3, 2024 20:54
Copy link
Contributor

@dtardon dtardon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in xml-utils.hxx break ABI. I don't think a minor optimization is a sufficient reason for doing that.

@serval2412
Copy link
Contributor Author

The changes in xml-utils.hxx break ABI. I don't think a minor optimization is a sufficient reason for doing that.
It's a free lib (so people may upgrade without paying) and major version is < 1 so not a stable version by definition.
Anyway, I've submitted a patch reverting this part.

@caolanm
Copy link
Contributor

caolanm commented Mar 5, 2024

Maybe could take the opportunity to change boost::shared_ptr to contemporary std:: equivalents and bump api/abi? At which point might as well make this change anyway? #64 for that thought, feel free to dismiss and keep things as they are :-)

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.

3 participants