mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
solve warnings in sample file
This commit is contained in:
parent
3935855365
commit
7429ed07be
@ -38,7 +38,7 @@ static void two_ways_to_write_rawdata_in_base64()
|
|||||||
CvFileStorage* fs = cvOpenFileStorage( "example.xml", 0, CV_STORAGE_WRITE );
|
CvFileStorage* fs = cvOpenFileStorage( "example.xml", 0, CV_STORAGE_WRITE );
|
||||||
// both CV_NODE_SEQ and "binary" are necessary.
|
// both CV_NODE_SEQ and "binary" are necessary.
|
||||||
cvStartWriteStruct(fs, "rawdata", CV_NODE_SEQ | CV_NODE_FLOW, "binary");
|
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);
|
cvEndWriteStruct(fs);
|
||||||
cvReleaseFileStorage( &fs );
|
cvReleaseFileStorage( &fs );
|
||||||
//! [without_base64_flag]
|
//! [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);
|
CvFileStorage* fs = cvOpenFileStorage( "example.xml", 0, CV_STORAGE_WRITE_BASE64);
|
||||||
// parameter, typename "binary" could be omitted.
|
// parameter, typename "binary" could be omitted.
|
||||||
cvStartWriteStruct(fs, "rawdata", CV_NODE_SEQ | CV_NODE_FLOW);
|
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);
|
cvEndWriteStruct(fs);
|
||||||
cvReleaseFileStorage( &fs );
|
cvReleaseFileStorage( &fs );
|
||||||
//! [with_write_base64_flag]
|
//! [with_write_base64_flag]
|
||||||
|
Loading…
Reference in New Issue
Block a user