Commit 0c765f3b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix clazy warning

parent 0ed72af1
...@@ -30,7 +30,7 @@ public: ...@@ -30,7 +30,7 @@ public:
char obj; char obj;
char conn[MAX_CONNS_PER_ATOM + 1]; char conn[MAX_CONNS_PER_ATOM + 1];
bool operator==(const atom& rhs) const { return (rhs.obj == obj && !strcmp(rhs.conn,conn)); } bool operator==(atom rhs) const { return (rhs.obj == obj && !strcmp(rhs.conn,conn)); }
bool isEmpty() const { return (obj == 0 || obj == '.'); } bool isEmpty() const { return (obj == 0 || obj == '.'); }
double weight() const { double weight() const {
switch (obj) { switch (obj) {
......
...@@ -78,7 +78,7 @@ QVariant ArrowFieldItem::itemChange( GraphicsItemChange change, const QVariant& ...@@ -78,7 +78,7 @@ QVariant ArrowFieldItem::itemChange( GraphicsItemChange change, const QVariant&
AtomFieldItem::AtomFieldItem( KGameRenderer* renderer, const atom& at, QGraphicsScene* scene ) AtomFieldItem::AtomFieldItem( KGameRenderer* renderer, atom at, QGraphicsScene* scene )
: FieldItem(renderer, s_names.value(at.obj), scene), m_atomNum(-1) : FieldItem(renderer, s_names.value(at.obj), scene), m_atomNum(-1)
{ {
if(s_names.empty()) if(s_names.empty())
...@@ -164,7 +164,7 @@ void AtomFieldItem::fillNameHashes() ...@@ -164,7 +164,7 @@ void AtomFieldItem::fillNameHashes()
s_bondNames['H'] = QStringLiteral("bond_III_Left"); s_bondNames['H'] = QStringLiteral("bond_III_Left");
} }
QPixmap AtomFieldItem::renderAtom( KGameRenderer* renderer, const atom& at, int size ) QPixmap AtomFieldItem::renderAtom( KGameRenderer* renderer, atom at, int size )
{ {
if (size == 0) return QPixmap(); if (size == 0) return QPixmap();
......
...@@ -64,7 +64,7 @@ private: ...@@ -64,7 +64,7 @@ private:
class AtomFieldItem : public FieldItem class AtomFieldItem : public FieldItem
{ {
public: public:
explicit AtomFieldItem( KGameRenderer* renderer, const atom& at, QGraphicsScene* scene ); explicit AtomFieldItem(KGameRenderer* renderer, atom at, QGraphicsScene* scene );
void setAtomNum(int n) { m_atomNum = n; } void setAtomNum(int n) { m_atomNum = n; }
int atomNum() const { return m_atomNum; } int atomNum() const { return m_atomNum; }
...@@ -78,7 +78,7 @@ public: ...@@ -78,7 +78,7 @@ public:
/** /**
* Statically render the atom, for MoleculePreviewItem * Statically render the atom, for MoleculePreviewItem
*/ */
static QPixmap renderAtom( KGameRenderer* renderer, const atom& at, int size); static QPixmap renderAtom(KGameRenderer* renderer, atom at, int size);
// enable use of qgraphicsitem_cast // enable use of qgraphicsitem_cast
enum { Type = UserType + 2 }; enum { Type = UserType + 2 };
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
class LevelSetDelegate : public QStyledItemDelegate class LevelSetDelegate : public QStyledItemDelegate
{ {
Q_OBJECT
public: public:
explicit LevelSetDelegate(QObject* parent = nullptr); explicit LevelSetDelegate(QObject* parent = nullptr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment