diff --git a/crouton.xcodeproj/project.pbxproj b/crouton.xcodeproj/project.pbxproj index d3d3cb4..c409917 100644 --- a/crouton.xcodeproj/project.pbxproj +++ b/crouton.xcodeproj/project.pbxproj @@ -1678,7 +1678,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if which missing_includes.rb >/dev/null\nthen\n cd \"$SRCROOT\"\n missing_includes.rb -w --base include/Base.hh include src\nelse\n echo \"Script missing_includes.rb not found.\"\n echo \"You can get it from https://gist.github.com/snej/2672fe996d39752e23c471f6ed789958\"\nfi\n"; + shellScript = "if which missing_includes.rb >/dev/null\nthen\n cd \"$SRCROOT\"\n missing_includes.rb -w --base include/util/Base.hh include src\nelse\n echo \"Script missing_includes.rb not found.\"\n echo \"You can get it from https://gist.github.com/snej/2672fe996d39752e23c471f6ed789958\"\nfi\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ diff --git a/include/util/Relation.hh b/include/util/Relation.hh index ad125ad..812abb0 100644 --- a/include/util/Relation.hh +++ b/include/util/Relation.hh @@ -128,7 +128,6 @@ namespace crouton::util { class ToMany : private LinkedList>, private Child { public: using super = LinkedList>; - using ToOne = ToOne; /// Initializes an unconnected Child. This should be a member initializer of Self. explicit ToMany(Self* self) :Child(self) { } @@ -151,35 +150,35 @@ namespace crouton::util { class iterator { public: - explicit iterator(super::iterator i) :_i(i) { } + explicit iterator(typename super::iterator i) :_i(i) { } Other& operator*() const {return *(_i->self());} Other* operator->() const {return _i->self();} iterator& operator++() {++_i; return *this;} friend bool operator==(iterator const& a, iterator const& b) {return a._i == b._i;} private: - super::iterator _i; + typename super::iterator _i; }; - iterator begin() {return iterator(super::begin());} - iterator end() {return iterator(super::end());} + iterator begin() {return iterator(super::begin());} + iterator end() {return iterator(super::end());} - void push_front(ToOne& link) {super::push_front(link); link._parent = this;} - void push_back(ToOne& link) {super::push_back(link); link._parent = this;} - void erase(ToOne& link) {super::erase(link); link._parent = nullptr;} + void push_front(ToOne& link) {super::push_front(link); link._parent = this;} + void push_back(ToOne& link) {super::push_back(link); link._parent = this;} + void erase(ToOne& link) {super::erase(link); link._parent = nullptr;} - void clear() {deAdopt(); super::clear();} + void clear() {deAdopt(); super::clear();} - ~ToMany() {deAdopt();} + ~ToMany() {deAdopt();} private: - friend ToOne; + friend ToOne; void adopt() { - for (ToOne& child : (super&)*this) + for (ToOne& child : (super&)*this) child._parent = this; } void deAdopt() { - for (ToOne& child : (super&)*this) + for (ToOne& child : (super&)*this) child._parent = nullptr; } };