Skip to content

Commit

Permalink
Removes unnecessary string copy from util
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 230830125
  • Loading branch information
nickgeorge authored and sundberg committed Jan 25, 2019
1 parent 3d690cc commit 4f69c80
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cc/google/fhir/stu3/codes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,8 @@ ::google::fhir::Status ConvertToGenericCode(

::google::fhir::StatusOr<FHIRAllTypesCode::Value> GetCodeForResourceType(
const google::protobuf::Message& resource) {
const string enum_string =
const string& enum_string =
TitleCaseToUpperUnderscores(resource.GetDescriptor()->name());
LOG(WARNING) << "ES: " << enum_string;
FHIRAllTypesCode::Value value;
if (FHIRAllTypesCode::Value_Parse(enum_string, &value)) {
return value;
Expand Down

0 comments on commit 4f69c80

Please sign in to comment.