Skip to content

Fix CPPCheck issues - Parameter should be const reference #9

@eljonny

Description

@eljonny

These parameters can be refactored as const references (we will see if that is possible/contextually valid, though at first glance I believe it is)

src/TestCPPTestCase.cpp:145:35: style: Parameter 'o' can be declared as reference to const [constParameterReference]
    TestCase::TestCase (TestCase& o) {
                                  ^
src/TestCPPTestCase.cpp:234:46: style: Parameter 'rhs' can be declared as reference to const [constParameterReference]
    TestCase& TestCase::operator= (TestCase& rhs) {
                                             ^
src/TestCPPTestCase.cpp:292:53: style: Parameter 'reason' can be declared as reference to const [constParameterReference]
    void TestCase::logFailure(ostream& out, string& reason) {
                                                    ^

Metadata

Metadata

Assignees

Labels

static-analysisAn issue related to a static analysis resulttest-caseRelating to TestCPP TestCase

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions