config_format.h Header

#include <config_format.h>

Functions

bool config_format_supported(const int & config, std::string * error = nullptr)
bool config_file_format_supported(const std::string & path, std::string * error = nullptr)

Function Documentation

bool config_format_supported(const int & config, std::string * error = nullptr)

Check a parsed config's declared format against kConfigFormat. Returns true when this build can read it (absent key = legacy = ok). On false, *error (when non-null) names the declared format and the supported one — callers prepend their own file context.

bool config_file_format_supported(const std::string & path, std::string * error = nullptr)

File-path form for callers that haven't parsed the JSON themselves (the GUI's open routing): reads and parses the file, then applies the check above. Unreadable/unparseable files pass — this gate is ONLY about a too-new format; existing error paths own everything else.

Appearance
Theme
—