mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-20 06:10:44 +00:00
8c95516224
- updaterevision for automated revision string generation - re2c as a prerequisite to use sc_man in the future - zipdir to automatically generate an engine resource file.
29 lines
327 B
C++
29 lines
327 B
C++
#ifndef _RE2C_UTIL_COUNTER_
|
|
#define _RE2C_UTIL_COUNTER_
|
|
|
|
namespace re2c {
|
|
|
|
template <typename num_t>
|
|
class counter_t
|
|
{
|
|
num_t num;
|
|
|
|
public:
|
|
counter_t ()
|
|
: num ()
|
|
{}
|
|
num_t next ()
|
|
{
|
|
num_t n = num;
|
|
num.inc ();
|
|
return n;
|
|
}
|
|
void reset ()
|
|
{
|
|
num = num_t ();
|
|
}
|
|
};
|
|
|
|
} // namespace re2c
|
|
|
|
#endif // _RE2C_UTIL_COUNTER_
|