Use fixed types in NetbiosSSN.h and Timer.h instead of bit fields

This commit is contained in:
Tim Wojtulewicz 2019-12-10 15:34:02 -07:00
parent 0c55b01ec9
commit a463c5763f
2 changed files with 13 additions and 15 deletions

View file

@ -12,7 +12,7 @@ extern "C" {
}
// If you add a timer here, adjust TimerNames in Timer.cc.
enum TimerType {
enum TimerType : uint8_t {
TIMER_BACKDOOR,
TIMER_BREAKPOINT,
TIMER_CONN_DELETE,
@ -51,8 +51,7 @@ class ODesc;
class Timer : public PQ_Element {
public:
Timer(double t, TimerType arg_type) : PQ_Element(t)
{ type = (char) arg_type; }
Timer(double t, TimerType arg_type) : PQ_Element(t), type(arg_type) { }
~Timer() override { }
TimerType Type() const { return (TimerType) type; }
@ -66,8 +65,7 @@ public:
protected:
Timer() {}
unsigned int type:8;
TimerType type;
};
class TimerMgr {