Fix set_name compiler method signature

Reviewed By: kholst

Other Notes: Follow up from 78130


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665434 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/parse/t_enum.h b/compiler/cpp/src/parse/t_enum.h
index 766c100..810f3be 100644
--- a/compiler/cpp/src/parse/t_enum.h
+++ b/compiler/cpp/src/parse/t_enum.h
@@ -20,10 +20,10 @@
   t_enum(t_program* program) :
     t_type(program) {}
 
-  void set_name(std::string name) {
+  void set_name(const std::string& name) {
     name_ = name;
   }
-  
+
   void append(t_enum_value* constant) {
     constants_.push_back(constant);
   }