THRIFT-922. cpp: Templatize binary and compact protocol
Convert TBinaryProtocol and TCompactProtocol to template classes, taking
the transport class as a template parameter. This allows them to make
non-virtual calls when using the template, improving serialization
performance.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005136 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/protocol/TJSONProtocol.cpp b/lib/cpp/src/protocol/TJSONProtocol.cpp
index ed2f518..9859c0f 100644
--- a/lib/cpp/src/protocol/TJSONProtocol.cpp
+++ b/lib/cpp/src/protocol/TJSONProtocol.cpp
@@ -358,6 +358,7 @@
TJSONProtocol::TJSONProtocol(boost::shared_ptr<TTransport> ptrans) :
TVirtualProtocol<TJSONProtocol>(ptrans),
+ trans_(ptrans.get()),
context_(new TJSONContext()),
reader_(*ptrans) {
}