/**************************************************************************** ** Copyright (c) 2024, Fougue Ltd. ** All rights reserved. ** See license at https://github.com/fougue/mayo/blob/master/LICENSE.txt ****************************************************************************/ #include "library_info.h" #include namespace Mayo { namespace { std::vector& getLibraryInfos() { static std::vector vec; return vec; } } // namespace void LibraryInfoArray::add( std::string_view libName, std::string_view version, std::string_view versionDetails ) { if (!libName.empty() && !version.empty()) { const LibraryInfo libInfo{ std::string(libName), std::string(version), std::string(versionDetails) }; getLibraryInfos().push_back(std::move(libInfo)); } } Span LibraryInfoArray::get() { return getLibraryInfos(); } } // namespace Mayo