From ccecd3405a22cd4ed4446574f8465fc7024f7708 Mon Sep 17 00:00:00 2001 From: Kazuma Furuhashi Date: Thu, 22 Aug 2019 23:32:25 +0900 Subject: [PATCH] Merge pull request #15007 from 284km:fixatypo s/last_occurence/last_occurrence/ --- modules/core/src/persistence.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/core/src/persistence.cpp b/modules/core/src/persistence.cpp index 15151c0b2b..9237beaf02 100644 --- a/modules/core/src/persistence.cpp +++ b/modules/core/src/persistence.cpp @@ -603,7 +603,7 @@ public: { int xml_buf_size = 1 << 10; char substr[] = ""; - int last_occurence = -1; + int last_occurrence = -1; xml_buf_size = MIN(xml_buf_size, int(file_size)); fseek( file, -xml_buf_size, SEEK_END ); std::vector xml_buf_(xml_buf_size+2); @@ -621,11 +621,11 @@ public: ptr = strstr( ptr, substr ); if( !ptr ) break; - last_occurence = line_offset + (int)(ptr - ptr0); + last_occurrence = line_offset + (int)(ptr - ptr0); ptr += strlen(substr); } } - if( last_occurence < 0 ) + if( last_occurrence < 0 ) { release(); CV_Error( CV_StsError, "Could not find in the end of file.\n" ); @@ -633,7 +633,7 @@ public: closeFile(); file = fopen( filename.c_str(), "r+t" ); CV_Assert(file != 0); - fseek( file, last_occurence, SEEK_SET ); + fseek( file, last_occurrence, SEEK_SET ); // replace the last "" with " ", which has the same length puts( " " ); fseek( file, 0, SEEK_END );