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

Fix clazy warning

parent 0ed72af1
......@@ -30,7 +30,7 @@ public:
char obj;
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 == '.'); }
double weight() const {
switch (obj) {
......
......@@ -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)
{
if(s_names.empty())
......@@ -164,7 +164,7 @@ void AtomFieldItem::fillNameHashes()
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();
......
......@@ -64,7 +64,7 @@ private:
class AtomFieldItem : public FieldItem
{
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; }
int atomNum() const { return m_atomNum; }
......@@ -78,7 +78,7 @@ public:
/**
* 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
enum { Type = UserType + 2 };
......
......@@ -27,6 +27,7 @@
class LevelSetDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
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