diff options
author | Noel Grandin <noel@peralex.com> | 2014-06-18 12:14:29 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-06-24 11:34:21 +0200 |
commit | e2080e70fe8b085f18e868e46340454720fa94ca (patch) | |
tree | 4038d1d57b41b68a47d5ebbbe6ad390648ec6303 /lotuswordpro/source/filter/tocread.cxx | |
parent | Translated German comments - correction (diff) | |
download | core-e2080e70fe8b085f18e868e46340454720fa94ca.tar.gz core-e2080e70fe8b085f18e868e46340454720fa94ca.zip |
new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can
be returning a reference.
e.g.
class A {
struct X x;
public X* getX() { return &x; }
}
which can be:
public X& getX() { return x; }
Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
Diffstat (limited to 'lotuswordpro/source/filter/tocread.cxx')
-rw-r--r-- | lotuswordpro/source/filter/tocread.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lotuswordpro/source/filter/tocread.cxx b/lotuswordpro/source/filter/tocread.cxx index bb143710338b..90544df0ad6a 100644 --- a/lotuswordpro/source/filter/tocread.cxx +++ b/lotuswordpro/source/filter/tocread.cxx @@ -278,7 +278,7 @@ CBenTOCReader::ReadTOC() } pCBenNamedObjectListElmt pPrevNamedObjectListElmt; - if (FindNamedObject(cpContainer->GetNamedObjects(), + if (FindNamedObject(&cpContainer->GetNamedObjects(), sBuffer, &pPrevNamedObjectListElmt) != NULL) { delete[] sAllocBuffer; @@ -286,7 +286,7 @@ CBenTOCReader::ReadTOC() } pCBenObject pPrevObject = (pCBenObject) cpContainer-> - GetObjects()->GetLast(); + GetObjects().GetLast(); if (PropertyID == BEN_PROPID_GLOBAL_PROPERTY_NAME) pObject = new CBenPropertyName(cpContainer, ObjectID, @@ -332,12 +332,12 @@ CBenTOCReader::ReadTOC() if (pObject == NULL) pObject = new CBenObject(cpContainer, ObjectID, - (pCBenObject) cpContainer->GetObjects()->GetLast()); + (pCBenObject) cpContainer->GetObjects().GetLast()); pProperty = new CBenProperty(pObject, PropertyID, TypeID, - (pCBenProperty) pObject->GetProperties()->GetLast()); + (pCBenProperty) pObject->GetProperties().GetLast()); - if ((Err = ReadSegments(pProperty->UseValue(), + if ((Err = ReadSegments(&pProperty->UseValue(), &LookAhead)) != BenErr_OK) return Err; } |