Commit 7429ed07 authored by MYLS's avatar MYLS

solve warnings in sample file

parent 39358553
......@@ -38,7 +38,7 @@ static void two_ways_to_write_rawdata_in_base64()
CvFileStorage* fs = cvOpenFileStorage( "example.xml", 0, CV_STORAGE_WRITE );
// both CV_NODE_SEQ and "binary" are necessary.
cvStartWriteStruct(fs, "rawdata", CV_NODE_SEQ | CV_NODE_FLOW, "binary");
cvWriteRawDataBase64(fs, rawdata.data(), rawdata.size(), "i");
cvWriteRawDataBase64(fs, rawdata.data(), static_cast<int>(rawdata.size()), "i");
cvEndWriteStruct(fs);
cvReleaseFileStorage( &fs );
//! [without_base64_flag]
......@@ -49,7 +49,7 @@ static void two_ways_to_write_rawdata_in_base64()
CvFileStorage* fs = cvOpenFileStorage( "example.xml", 0, CV_STORAGE_WRITE_BASE64);
// parameter, typename "binary" could be omitted.
cvStartWriteStruct(fs, "rawdata", CV_NODE_SEQ | CV_NODE_FLOW);
cvWriteRawData(fs, rawdata.data(), rawdata.size(), "i");
cvWriteRawData(fs, rawdata.data(), static_cast<int>(rawdata.size()), "i");
cvEndWriteStruct(fs);
cvReleaseFileStorage( &fs );
//! [with_write_base64_flag]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment