I was still looking at the protocol versioning and noticed that the work
Carl already did means that the AMQP_MethodVersionMap code no longer
needs to carry round a version in it. So here is a small patch to remove
this code.

- It's mostly changes to the gentool cpp templates

(Apply from qpid top level)

Andrew

Property changes on: cpp
___________________________________________________________________
Name: subclipse:tags
   + 492713,qpid.0-9,/incubator/qpid/branches/qpid.0-9,branch

Index: cpp/lib/common/framing/AMQFrame.cpp
===================================================================
--- cpp/lib/common/framing/AMQFrame.cpp	(revision 494479)
+++ cpp/lib/common/framing/AMQFrame.cpp	(working copy)
@@ -24,9 +24,7 @@
 
 using namespace qpid::framing;
 
-// This only works as a static as the version is currently fixed to 8.0
-// TODO: When the class is version-aware this will need to change
-AMQP_MethodVersionMap AMQFrame::versionMap(0,9);
+AMQP_MethodVersionMap AMQFrame::versionMap;
 
 // AMQP version management change - kpvdr 2-11-17
 // TODO: Make this class version-aware
Index: gentools/templ.cpp/AMQP_MethodVersionMap.h.tmpl
===================================================================
--- gentools/templ.cpp/AMQP_MethodVersionMap.h.tmpl	(revision 494479)
+++ gentools/templ.cpp/AMQP_MethodVersionMap.h.tmpl	(working copy)
@@ -45,10 +45,9 @@
 class AMQP_MethodVersionMap: public std::map<u_int64_t, fnPtr>
 {
 protected:
-    ProtocolVersion version;
 	u_int64_t createMapKey(u_int16_t classId, u_int16_t methodId, u_int8_t major, u_int8_t minor);
 public:
-	AMQP_MethodVersionMap(u_int8_t major, u_int8_t minor);
+	AMQP_MethodVersionMap();
 	AMQMethodBody* createMethodBody(u_int16_t classId, u_int16_t methodId, u_int8_t major, u_int8_t minor);
 };
 
Index: gentools/templ.cpp/AMQP_MethodVersionMap.cpp.tmpl
===================================================================
--- gentools/templ.cpp/AMQP_MethodVersionMap.cpp.tmpl	(revision 494479)
+++ gentools/templ.cpp/AMQP_MethodVersionMap.cpp.tmpl	(working copy)
@@ -35,7 +35,7 @@
 namespace framing
 {
 
-AMQP_MethodVersionMap::AMQP_MethodVersionMap(u_int8_t major, u_int8_t minor): version(major, minor)
+AMQP_MethodVersionMap::AMQP_MethodVersionMap()
 {
 %{CLIST} ${mc_create_method_body_map_entry}	
 }

Reply via email to