netclass: Make pointer to base class const
The base class type is not owned by a class and is shared. For this reason it must not be modified. To ensure this mark the base class pointer as const. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
b3f7ce6020
commit
583a7ddc35
|
|
@ -23,8 +23,8 @@
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
netclass_t::netclass_t(perm_string name, netclass_t*sup)
|
netclass_t::netclass_t(perm_string name, const netclass_t*super)
|
||||||
: name_(name), super_(sup), class_scope_(0), definition_scope_(0)
|
: name_(name), super_(super), class_scope_(0), definition_scope_(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class PExpr;
|
||||||
|
|
||||||
class netclass_t : public ivl_type_s {
|
class netclass_t : public ivl_type_s {
|
||||||
public:
|
public:
|
||||||
netclass_t(perm_string class_name, netclass_t*par);
|
netclass_t(perm_string class_name, const netclass_t*super);
|
||||||
~netclass_t();
|
~netclass_t();
|
||||||
|
|
||||||
// Set the property of the class during elaboration. Set the
|
// Set the property of the class during elaboration. Set the
|
||||||
|
|
@ -120,7 +120,7 @@ class netclass_t : public ivl_type_s {
|
||||||
perm_string name_;
|
perm_string name_;
|
||||||
// If this is derived from another base class, point to it
|
// If this is derived from another base class, point to it
|
||||||
// here.
|
// here.
|
||||||
netclass_t*super_;
|
const netclass_t*super_;
|
||||||
// Map property names to property table index.
|
// Map property names to property table index.
|
||||||
std::map<perm_string,size_t> properties_;
|
std::map<perm_string,size_t> properties_;
|
||||||
// Vector of properties.
|
// Vector of properties.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue