Thrift: Fix fingerprinting bug.
Summary:
Fingerprints were'nt being initialized properly because I forgot to move
the initialization from t_struct to t_type. Fixed that.
Also, typedefs weren't generating fingerprints for their true types.
Reviewed By: mcslee
Test Plan:
This didn't work before with -cpp -dense. Now it does.
typedef list<i32> ilist
struct foo { 1: ilist l }
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665268 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/parse/t_struct.h b/compiler/cpp/src/parse/t_struct.h
index 05cd216..39da110 100644
--- a/compiler/cpp/src/parse/t_struct.h
+++ b/compiler/cpp/src/parse/t_struct.h
@@ -9,7 +9,6 @@
#include <vector>
#include <string>
-#include <cstring>
#include "t_type.h"
#include "t_field.h"
@@ -28,18 +27,12 @@
t_struct(t_program* program) :
t_type(program),
is_xception_(false),
- xsd_all_(false)
- {
- memset(fingerprint_, 0, sizeof(fingerprint_));
- }
+ xsd_all_(false) {}
t_struct(t_program* program, const std::string& name) :
t_type(program, name),
is_xception_(false),
- xsd_all_(false)
- {
- memset(fingerprint_, 0, sizeof(fingerprint_));
- }
+ xsd_all_(false) {}
void set_name(const std::string& name) {
name_ = name;