- Please reformat the code.
if(defid.find(DuplicateDefString) != Glib::ustring::npos)break;
is very hard to read.
- Could you change the "if (it->type == REF_HREF)" list to a switch statement?
- This section
+ SPObject *trg = source->getObjectByRepr(laterDef);
+ Glib::ustring newid = trg->getId();
+ if(newid.find(DuplicateDefString) != Glib::ustring::npos)continue; // this one already handled
+ if (trg && SP_IS_GRADIENT(trg) && src != trg) {
crashes if trg == nullptr.
Also, please don't rely on operator precedence and put parens around src!=trg
- About
+ if (gr->isEquivalent(SP_GRADIENT(trg)) &&
+ gr->isAligned(SP_GRADIENT(trg))) {
SP_GRADIENT(trg) is potentially expensive, so don't duplicate it unnecessarily.
- About
+ gboolean duplicate = false;
Use C++ bool instead.
Comments about the patch in #10:
- Please reformat the code. defid.find( DuplicateDefStr ing) != Glib::ustring: :npos)break;
if(
is very hard to read.
- Could you change the "if (it->type == REF_HREF)" list to a switch statement?
- This section >getObjectByRep r(laterDef) ; find(DuplicateD efString) != Glib::ustring: :npos)continue; // this one already handled
+ SPObject *trg = source-
+ Glib::ustring newid = trg->getId();
+ if(newid.
+ if (trg && SP_IS_GRADIENT(trg) && src != trg) {
crashes if trg == nullptr.
Also, please don't rely on operator precedence and put parens around src!=trg
- About nt(SP_GRADIENT( trg)) && SP_GRADIENT( trg))) {
+ if (gr->isEquivale
+ gr->isAligned(
SP_GRADIENT(trg) is potentially expensive, so don't duplicate it unnecessarily.
- About
+ gboolean duplicate = false;
Use C++ bool instead.