Permalink
Browse files

Make counter in TagInfo an unsigned int

  • Loading branch information...
lauft committed Jul 31, 2018
1 parent 3abff67 commit 9b0372fc687d69095f6d4323e6ab7ff80a0c2a1e
Showing with 12 additions and 8 deletions.
  1. +7 −4 src/TagInfo.cpp
  2. +5 −4 src/TagInfo.h
@@ -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;
}
@@ -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 9b0372f

Please sign in to comment.