mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-28 06:49:32 -05:00
Make image get function return std::optional if the image is not found
This commit is contained in:
@@ -35,9 +35,9 @@ namespace openspace {
|
||||
namespace documentation { struct Documentation; }
|
||||
|
||||
struct ImageData {
|
||||
std::string name = "";
|
||||
std::string name;
|
||||
std::string thumbnailUrl;
|
||||
std::string imageUrl = "";
|
||||
std::string imageUrl;
|
||||
std::string credits;
|
||||
std::string creditsUrl;
|
||||
std::string collection;
|
||||
@@ -52,7 +52,7 @@ class WwtDataHandler {
|
||||
public:
|
||||
void loadImages(const std::string& root, const std::filesystem::path& directory);
|
||||
int nLoadedImages() const;
|
||||
const ImageData& image(const std::string& imageUrl) const;
|
||||
std::optional<const ImageData> image(const std::string& imageUrl) const;
|
||||
const std::map<std::string, ImageData>& images() const;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user