@@ -31,8 +31,7 @@ namespace Langulus::Entity
3131 if constexpr (SEEK & Seek::Above) {
3232 // Seek in parents up to root, if requested
3333 if (mOwner ) {
34- result = mOwner ->template
35- SeekUnit<Seek::HereAndAbove>(meta, offset);
34+ result = mOwner ->template SeekUnit <Seek::HereAndAbove>(meta, offset);
3635 if (result)
3736 return result;
3837 }
@@ -41,8 +40,7 @@ namespace Langulus::Entity
4140 if constexpr (SEEK & Seek::Below) {
4241 // Seek children, if requested
4342 for (auto child : mChildren ) {
44- result = child->template
45- SeekUnit<Seek::HereAndBelow>(meta, offset);
43+ result = child->template SeekUnit <Seek::HereAndBelow>(meta, offset);
4644 if (result)
4745 return result;
4846 }
@@ -101,8 +99,7 @@ namespace Langulus::Entity
10199 if constexpr (SEEK & Seek::Above) {
102100 // Seek in parents up to root, if requested
103101 if (mOwner ) {
104- result = mOwner ->template
105- SeekUnitExt<Seek::HereAndAbove>(type, ext, offset);
102+ result = mOwner ->template SeekUnitExt <Seek::HereAndAbove>(type, ext, offset);
106103 if (result)
107104 return result;
108105 }
@@ -111,8 +108,7 @@ namespace Langulus::Entity
111108 if constexpr (SEEK & Seek::Below) {
112109 // Seek children, if requested
113110 for (auto child : mChildren ) {
114- result = child->template
115- SeekUnitExt<Seek::HereAndBelow>(type, ext, offset);
111+ result = child->template SeekUnitExt <Seek::HereAndBelow>(type, ext, offset);
116112 if (result)
117113 return result;
118114 }
@@ -171,8 +167,7 @@ namespace Langulus::Entity
171167 if constexpr (SEEK & Seek::Above) {
172168 // Seek in parents up to root, if requested
173169 if (mOwner ) {
174- auto output = mOwner ->template
175- SeekTrait<Seek::HereAndAbove>(meta, offset);
170+ auto output = mOwner ->template SeekTrait <Seek::HereAndAbove>(meta, offset);
176171 if (output)
177172 return Abandon (output);
178173 }
@@ -181,8 +176,7 @@ namespace Langulus::Entity
181176 if constexpr (SEEK & Seek::Below) {
182177 // Seek children, if requested
183178 for (auto child : mChildren ) {
184- auto output = child->template
185- SeekTrait<Seek::HereAndBelow>(meta, offset);
179+ auto output = child->template SeekTrait <Seek::HereAndBelow>(meta, offset);
186180 if (output)
187181 return Abandon (output);
188182 }
@@ -242,37 +236,37 @@ namespace Langulus::Entity
242236 if constexpr (SEEK & Seek::Here) {
243237 // Seek here if requested
244238 auto temp = GetTrait (meta, offset);
245- try {
246- if (CT::Pinnable<D> and temp.Is <TypeOf<D>>())
247- output = temp.As <TypeOf<D>>();
248- else if (not CT::Pinnable<D> and temp.Is <D>())
249- output = temp.As <D>();
250- else if constexpr (CT::DescriptorMakable<D>)
251- output = D {Describe (static_cast <const Many&>(temp))};
252- else if constexpr (CT::Pinnable<D>)
253- output = temp.template AsCast <TypeOf<D>>();
254- else
255- output = temp.template AsCast <D>();
256-
257- return true ;
239+ if (temp) {
240+ try {
241+ if (CT::Pinnable<D> and temp.Is <TypeOf<D>>())
242+ output = temp.As <TypeOf<D>>();
243+ else if (not CT::Pinnable<D> and temp.Is <D>())
244+ output = temp.As <D>();
245+ else if constexpr (CT::DescriptorMakable<D>)
246+ output = D {Describe (static_cast <const Many&>(temp))};
247+ else if constexpr (CT::Pinnable<D>)
248+ output = temp.template AsCast <TypeOf<D>>();
249+ else
250+ output = temp.template AsCast <D>();
251+
252+ return true ;
253+ }
254+ catch (...) {}
258255 }
259- catch (...) { }
260256 }
261257
262258 if constexpr (SEEK & Seek::Above) {
263259 // Seek in parents up to root, if requested
264260 if (mOwner ) {
265- if (mOwner ->template
266- SeekValue<Seek::HereAndAbove>(meta, output, offset))
261+ if (mOwner ->template SeekValue <Seek::HereAndAbove>(meta, output, offset))
267262 return true ;
268263 }
269264 }
270265
271266 if constexpr (SEEK & Seek::Below) {
272267 // Seek children, if requested
273268 for (auto child : mChildren ) {
274- if (child->template
275- SeekValue<Seek::HereAndBelow>(meta, output, offset))
269+ if (child->template SeekValue <Seek::HereAndBelow>(meta, output, offset))
276270 return true ;
277271 }
278272 }
0 commit comments