hnOsmium0001

Untitled

Jul 28th, 2020
93
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. size_t properties_cnt = properties->get_child_count() - 1;
  2. size_t count = std::max(properties_cnt, info.size());
  3. for (int i = 1; i < count + 1; ++i) {
  4. if (i >= properties->get_child_count()) {
  5. add_root_property();
  6. }
  7. if (auto prop = Object::cast_to<ResourceSchemaNode>(properties->get_child(i))) {
  8. // if (auto iter = info.find(prop->get_field_name()); iter != info.end()) {
  9. // prop->update_with(iter->second);
  10. // }
  11. } else {
  12. ERR_PRINT("Properties box contains unexpected nodes that aren't of type ResourceSchemaNode");
  13. }
  14. }
  15. // Free the extra UI properties that we don't need.
  16. for (int i = 1 + info.size(); i < properties->get_child_count(); ++i) {
  17. properties->get_child(i)->free();
  18. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×