Skip to content

Commit a3d39ab

Browse files
authored
Merge pull request #1176 from pinkavaj/pi-tag-ref
Remove unnecessary TagInfo constructor (refactor)
2 parents c9796cc + f40e9ef commit a3d39ab

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/qtgui/bookmarks.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,7 @@ TagInfo &Bookmarks::findOrAddTag(QString tagName)
245245
if (idx != -1)
246246
return m_TagList[idx];
247247

248-
TagInfo info;
249-
info.name=tagName;
248+
TagInfo info(tagName);
250249
m_TagList.append(info);
251250
emit TagListChanged();
252251
return m_TagList.last();

src/qtgui/bookmarks.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ struct TagInfo
4040
static const QColor DefaultColor;
4141
static const QString strUntagged;
4242

43-
TagInfo()
44-
{
45-
active=true;
46-
this->color=DefaultColor;
47-
}
4843
TagInfo(QString name)
4944
{
5045
active=true;

0 commit comments

Comments
 (0)