// -*- c++ -*- // Distributed under the BSD 2-Clause License. // See accompanying file LICENSE for details. #include "pointerlist.h" PointerList::PointerList(int argc, const char* argv[]) { for(int i = 0; i < argc; ++i) { push_back(argv[i]); } } std::pair PointerList::get() { argptrs.clear(); for(const auto& arg : *this) { argptrs.push_back(arg.data()); } if(argptrs.size() == 0) { return {0, nullptr}; } return {argptrs.size(), argptrs.data()}; }