Solves issue #10506
authorlopespt <guilhermewachs@gmail.com>
Thu, 5 Apr 2018 23:25:32 +0000 (20:25 -0300)
committerlopespt <guilhermewachs@gmail.com>
Thu, 5 Apr 2018 23:25:32 +0000 (20:25 -0300)
modules/core/include/opencv2/core/persistence.hpp
modules/core/src/persistence_cpp.cpp

index 6d8ad20..5103c7d 100644 (file)
@@ -438,6 +438,8 @@ public:
      * @param name Name 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);
     /// @overload
     CV_WRAP void write(const String& name, const String& val);
index 4c3ec44..9b1e6bd 100644 (file)
@@ -178,6 +178,12 @@ void FileStorage::writeObj( const String& name, const void* 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 )
 {
     *this << name << val;