| 1008 | } |
| 1009 | |
| 1010 | void |
| 1011 | AMReX::push (AMReX* pamrex) |
| 1012 | { |
| 1013 | auto r = std::find_if(m_instance.begin(), m_instance.end(), |
| 1014 | [=] (const std::unique_ptr<AMReX>& x) -> bool |
| 1015 | { return x.get() == pamrex; }); |
| 1016 | if (r == m_instance.end()) { |
| 1017 | m_instance.emplace_back(pamrex); |
| 1018 | } else if (r+1 != m_instance.end()) { |
| 1019 | std::rotate(r, r+1, m_instance.end()); |
| 1020 | } |
| 1021 | } |
| 1022 | |
| 1023 | void |
| 1024 | AMReX::push (std::unique_ptr<AMReX> pamrex) |
no test coverage detected