diff --git a/src/Debug.h b/src/Debug.h index 1ad462f166..7e414262c9 100644 --- a/src/Debug.h +++ b/src/Debug.h @@ -29,8 +29,7 @@ struct ParseLocationRec { #include "DbgBreakpoint.h" class StmtLocMapping; -declare(PQueue,StmtLocMapping); -typedef PQueue(StmtLocMapping) Filemap; // mapping for a single file +typedef PQueue Filemap; // mapping for a single file class DbgBreakpoint; class DbgWatch; diff --git a/src/DebugCmds.cc b/src/DebugCmds.cc index 863a35a2f8..dcba46d195 100644 --- a/src/DebugCmds.cc +++ b/src/DebugCmds.cc @@ -114,7 +114,7 @@ void choose_global_symbols_regex(const string& regex, vector& choices, // DebugCmdInfo implementation // -PQueue(DebugCmdInfo) g_DebugCmdInfos; +PQueue g_DebugCmdInfos; DebugCmdInfo::DebugCmdInfo(const DebugCmdInfo& info) : cmd(info.cmd), helpstring(0) diff --git a/src/DebugCmds.h b/src/DebugCmds.h index e7b9c6a4c1..1c6c243786 100644 --- a/src/DebugCmds.h +++ b/src/DebugCmds.h @@ -12,9 +12,6 @@ using namespace std; #include "Queue.h" #include "DebugCmdConstants.h" -class DebugCmdInfo; -declare(PQueue,DebugCmdInfo); - class DebugCmdInfo { public: DebugCmdInfo(const DebugCmdInfo& info); @@ -47,7 +44,7 @@ protected: bool repeatable; }; -extern PQueue(DebugCmdInfo) g_DebugCmdInfos; +extern PQueue g_DebugCmdInfos; void init_global_dbg_constants (); diff --git a/src/analyzer/protocol/stepping-stone/SteppingStone.cc b/src/analyzer/protocol/stepping-stone/SteppingStone.cc index d3844846b9..1f40ea7ec5 100644 --- a/src/analyzer/protocol/stepping-stone/SteppingStone.cc +++ b/src/analyzer/protocol/stepping-stone/SteppingStone.cc @@ -77,12 +77,11 @@ int SteppingStoneEndpoint::DataSent(double t, uint64 seq, int len, int caplen, while ( stp_manager->OrderedEndpoints().length() > 0 ) { - int f = stp_manager->OrderedEndpoints().front(); + auto e = stp_manager->OrderedEndpoints().front(); - if ( stp_manager->OrderedEndpoints()[f]->stp_resume_time < tmin ) + if ( e->stp_resume_time < tmin ) { - SteppingStoneEndpoint* e = - stp_manager->OrderedEndpoints().pop_front(); + stp_manager->OrderedEndpoints().pop_front(); e->Done(); Unref(e); } diff --git a/src/analyzer/protocol/stepping-stone/SteppingStone.h b/src/analyzer/protocol/stepping-stone/SteppingStone.h index d4ced61551..502e3caa7e 100644 --- a/src/analyzer/protocol/stepping-stone/SteppingStone.h +++ b/src/analyzer/protocol/stepping-stone/SteppingStone.h @@ -13,8 +13,6 @@ namespace analyzer { namespace stepping_stone { class SteppingStoneEndpoint; class SteppingStoneManager; -declare(PQueue,SteppingStoneEndpoint); - class SteppingStoneEndpoint : public BroObj { public: SteppingStoneEndpoint(tcp::TCP_Endpoint* e, SteppingStoneManager* m); @@ -75,14 +73,14 @@ class SteppingStoneManager { public: SteppingStoneManager() { endp_cnt = 0; } - PQueue(SteppingStoneEndpoint)& OrderedEndpoints() + PQueue& OrderedEndpoints() { return ordered_endps; } // Use postfix ++, since the first ID needs to be even. int NextID() { return endp_cnt++; } protected: - PQueue(SteppingStoneEndpoint) ordered_endps; + PQueue ordered_endps; int endp_cnt; };