Removed useless function Type::ref.
Test: make hidl-gen, hidl_test
Change-Id: I9358a12d43b2a856e5150eb69fb8bc9ccfadf65b
diff --git a/AST.cpp b/AST.cpp
index a1fab37..016204b 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -227,7 +227,7 @@
type = static_cast<TypeDef *>(type)->referencedType();
}
- return type->ref();
+ return type;
}
}
}
@@ -347,7 +347,7 @@
}
}
- return returnedType->ref();
+ return returnedType;
}
Type *AST::findDefinedType(const FQName &fqName, FQName *matchingName) const {
diff --git a/Type.h b/Type.h
index 4156405..f510340 100644
--- a/Type.h
+++ b/Type.h
@@ -35,8 +35,6 @@
Type();
virtual ~Type();
- Type *ref() { return this; }
-
virtual bool isScope() const;
virtual bool isInterface() const;
virtual bool isEnum() const;
diff --git a/hidl-gen_y.yy b/hidl-gen_y.yy
index c494643..9163aa3 100644
--- a/hidl-gen_y.yy
+++ b/hidl-gen_y.yy
@@ -590,7 +590,7 @@
YYERROR;
}
- $$ = container->ref();
+ $$ = container;
}
;
@@ -687,7 +687,7 @@
YYERROR;
}
- $$ = enumType->ref();
+ $$ = enumType;
}
| ENUM IDENTIFIER opt_storage_type
{
@@ -704,7 +704,7 @@
YYERROR;
}
- $$ = enumType->ref();
+ $$ = enumType;
}
;