| // WARNING: This file is machine generated by fidlgen. |
| |
| #include <fidl/test.arrays/cpp/natural_types.h> |
| |
| ::test_arrays::StructSmallArray::Storage_ test_arrays::StructSmallArray::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.a)}; |
| } |
| |
| ::test_arrays::StructLargeArray::Storage_ test_arrays::StructLargeArray::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.a)}; |
| } |
| |
| ::test_arrays::TableSmallArray::Storage_ test_arrays::TableSmallArray::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.a)}; |
| } |
| |
| ::test_arrays::TableLargeArray::Storage_ test_arrays::TableLargeArray::CloneStorage_() const { |
| return Storage_{ |
| ::fidl::internal::NaturalClone(storage_.a)}; |
| } |
| |
| std::shared_ptr<::test_arrays::UnionSmallArray::Storage_> test_arrays::UnionSmallArray::CloneStorage_() const { |
| const Storage_& storage = *storage_; |
| switch (storage_->index()) { |
| case 1: |
| return std::make_shared<Storage_>( |
| std::in_place_index<1>, |
| ::fidl::internal::NaturalClone(std::get<1>(storage))); |
| default: |
| return std::make_shared<Storage_>(); |
| } |
| } |
| |
| std::shared_ptr<::test_arrays::UnionLargeArray::Storage_> test_arrays::UnionLargeArray::CloneStorage_() const { |
| const Storage_& storage = *storage_; |
| switch (storage_->index()) { |
| case 1: |
| return std::make_shared<Storage_>( |
| std::in_place_index<1>, |
| ::fidl::internal::NaturalClone(std::get<1>(storage))); |
| default: |
| return std::make_shared<Storage_>(); |
| } |
| } |