mirror of
https://github.com/opencv/opencv.git
synced 2024-12-02 07:39:57 +08:00
Fix for bug #3599: cv::FileStorage does not work for std::vector of user-defined struct.
This commit is contained in:
parent
70e22b682d
commit
b96762a48f
@ -697,11 +697,11 @@ void write(FileStorage& fs, const String& name, const Range& r )
|
|||||||
template<typename _Tp> static inline
|
template<typename _Tp> static inline
|
||||||
void write( FileStorage& fs, const String& name, const std::vector<_Tp>& vec )
|
void write( FileStorage& fs, const String& name, const std::vector<_Tp>& vec )
|
||||||
{
|
{
|
||||||
internal::WriteStructContext ws(fs, name, FileNode::SEQ+(DataType<_Tp>::fmt != 0 ? FileNode::FLOW : 0));
|
fs << (DataType<_Tp>::fmt != 0 ? "[:" : "[");
|
||||||
write(fs, vec);
|
write(fs, vec);
|
||||||
|
fs << "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
void read(const FileNode& node, bool& value, bool default_value)
|
void read(const FileNode& node, bool& value, bool default_value)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user