mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
Fixed bool type IO in FileStorage.
This commit is contained in:
@@ -2907,8 +2907,7 @@ void read(const FileNode& node, std::string& val, const std::string& default_val
|
||||
void FileStorage::Impl::write(const String &key, bool value)
|
||||
{
|
||||
CV_Assert(write_mode);
|
||||
// [SWAP LOGIC]
|
||||
if (fmt == FileStorage::FORMAT_YAML_1_0)
|
||||
if (fmt != FileStorage::FORMAT_YAML)
|
||||
{
|
||||
// Legacy behavior: Write as integer 1 or 0
|
||||
getEmitter().write(key.c_str(), (int)value);
|
||||
|
||||
Reference in New Issue
Block a user