Skip to content

Commit

Permalink
Make counter in TagInfo an unsigned int
Browse files Browse the repository at this point in the history
  • Loading branch information
lauft committed Aug 1, 2018
1 parent 5f66dff commit 1420ca2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
11 changes: 7 additions & 4 deletions src/TagInfo.cpp
Expand Up @@ -24,19 +24,22 @@
//
////////////////////////////////////////////////////////////////////////////////

#include "TagInfo.h"
#include <TagInfo.h>

TagInfo::TagInfo (int count)
////////////////////////////////////////////////////////////////////////////////
TagInfo::TagInfo (unsigned int count)
{
_count = count;
}

int TagInfo::increment ()
////////////////////////////////////////////////////////////////////////////////
unsigned int TagInfo::increment ()
{
return _count++;
}

int TagInfo::decrement ()
////////////////////////////////////////////////////////////////////////////////
unsigned int TagInfo::decrement ()
{
return --_count;
}
9 changes: 5 additions & 4 deletions src/TagInfo.h
Expand Up @@ -30,13 +30,14 @@
class TagInfo
{
public:
explicit TagInfo (int);
explicit TagInfo (unsigned int);

unsigned int increment ();
unsigned int decrement ();

int increment ();
int decrement ();

private:
int _count = 0;
unsigned int _count = 0;
};

#endif

0 comments on commit 1420ca2

Please sign in to comment.