Skip to content

Commit 09cd905

Browse files
committed
Make Type methods be pure virtual
1 parent 494d1a2 commit 09cd905

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

bindgen/ir/types/Type.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
11
#include "Type.h"
22

3-
std::string Type::str() const { return ""; }
4-
5-
bool Type::usesType(const std::shared_ptr<Type> &type,
6-
bool stopOnTypeDefs) const {
7-
return false;
8-
}
9-
10-
bool Type::operator==(const Type &other) const { return false; }
11-
123
bool Type::operator!=(const Type &other) const { return !(*this == other); }

bindgen/ir/types/Type.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Type {
1111
public:
1212
virtual ~Type() = default;
1313

14-
virtual std::string str() const;
14+
virtual std::string str() const = 0;
1515

1616
/**
1717
* @param stopOnTypeDefs if this parameter is true then TypeDefs instances
@@ -21,9 +21,9 @@ class Type {
2121
* typedef are found.
2222
*/
2323
virtual bool usesType(const std::shared_ptr<Type> &type,
24-
bool stopOnTypeDefs) const;
24+
bool stopOnTypeDefs) const = 0;
2525

26-
virtual bool operator==(const Type &other) const;
26+
virtual bool operator==(const Type &other) const = 0;
2727

2828
virtual bool operator!=(const Type &other) const;
2929
};

0 commit comments

Comments
 (0)