Solves issue #10506

This commit is contained in:
lopespt 2018-04-05 20:25:32 -03:00
parent 7bc980edaf
commit c17ce1a0af
2 changed files with 8 additions and 0 deletions

View File

@ -438,6 +438,8 @@ public:
* @param name Name of the written object * @param name Name of the written object
* @param val Value of the written object * @param val Value of the written object
*/ */
CV_WRAP void write(const String& name, int val);
/// @overload
CV_WRAP void write(const String& name, double val); CV_WRAP void write(const String& name, double val);
/// @overload /// @overload
CV_WRAP void write(const String& name, const String& val); CV_WRAP void write(const String& name, const String& val);

View File

@ -178,6 +178,12 @@ void FileStorage::writeObj( const String& name, const void* obj )
cvWrite( fs, name.size() > 0 ? name.c_str() : 0, obj ); cvWrite( fs, name.size() > 0 ? name.c_str() : 0, obj );
} }
void FileStorage::write( const String& name, int val )
{
*this << name << val;
}
void FileStorage::write( const String& name, double val ) void FileStorage::write( const String& name, double val )
{ {
*this << name << val; *this << name << val;