Fixed a few typos - test client and server samples now working with new code generation


	


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664753 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/src/cpp_generator.py b/compiler/src/cpp_generator.py
index 06c253d..b03ca5d 100644
--- a/compiler/src/cpp_generator.py
+++ b/compiler/src/cpp_generator.py
@@ -230,7 +230,7 @@
 CPP_INTERFACE_DECLARATION = Template("""
 class ${service}If {
     public:
-    ~${service}If() {}
+    virtual ~${service}If() {}
 ${functionDeclarations}};
 """)
 
@@ -322,8 +322,6 @@
 CPP_SERVER_PROCESS_DEFINITION = Template("""
 bool ${service}ServerIf::process("""+CPP_TRANSPORTP+""" itrans, """+CPP_TRANSPORTP+""" otrans) {
 
-    uint32_t xfer = 0;
-
     std::string name;
 
     """+CPP_PROTOCOL_MESSAGE_TYPE+""" messageType;
@@ -337,6 +335,8 @@
     } else {
         throw """+CPP_EXCEPTION+"""(\"Unexpected message type\");     
     }
+
+    return true;
 }
 """)
 
@@ -785,7 +785,7 @@
 
    xfer += iprot->readU32(itrans, count);
 
-   for(int ix = 0; ix <  count; ix++) {
+   for(uint32_t ix = 0; ix < count; ix++) {
        ${keyReaderCall};
        ${valueReaderCall};
        value.insert(std::make_pair(key, elem));
@@ -819,7 +819,7 @@
 
    xfer+= iprot->readU32(itrans,  count);
 
-   for(int ix = 0; ix < count; ix++) {
+   for(uint32_t ix = 0; ix < count; ix++) {
        ${valueReaderCall};
        value.${insert}(elem);
    }