Commit b75a5b2eeda0012648eb76cb6087dec8e0b6d1fc

Authored by Jürgen Knödlseder
1 parent 17bb9964

Pass GModel by reference.

Showing 1 changed file with 2 additions and 2 deletions
pyext/GModels.i
... ... @@ -79,7 +79,7 @@ public:
79 79 GModel* __getitem__(const std::string& name) {
80 80 return (*self)[name];
81 81 }
82   - void __setitem__(const int& index, const GModel* val) {
  82 + void __setitem__(const int& index, const GModel& val) {
83 83 if (index >= 0 && index < self->size()) {
84 84 self->set(index, val);
85 85 return;
... ... @@ -89,7 +89,7 @@ public:
89 89 0, self->size()-1);
90 90 }
91 91 }
92   - void __setitem__(const std::string& name, const GModel* val) {
  92 + void __setitem__(const std::string& name, const GModel& val) {
93 93 self->set(name, val);
94 94 return;
95 95 }
... ...