mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Merge pull request #29088 from asmorkalov:as/5.x_bool_io
Fixed bool type IO in FileStorage.
This commit is contained in:
@@ -2921,8 +2921,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