1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge pull request #26434 from dkurt:dk/int64_file_storage_4.x

int64 data type support for FileStorage. 1d and empty Mat with exact dimensions #26434

### Pull Request Readiness Checklist

Port of https://github.com/opencv/opencv/pull/26399 to 4.x branch

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Dmitry Kurtaev
2024-11-11 14:13:33 +03:00
committed by GitHub
parent 6f8c3b13d8
commit 37c2af63f0
9 changed files with 166 additions and 17 deletions
+7 -1
View File
@@ -145,6 +145,12 @@ public:
writeScalar( key, ptr);
}
void write(const char* key, int64_t value)
{
char buf[128], *ptr = fs::itoa( value, buf, 10, true );
writeScalar( key, ptr);
}
void write( const char* key, double value )
{
char buf[128];
@@ -556,7 +562,7 @@ public:
}
else
{
int ival = (int)strtol( ptr, &endptr, 0 );
int64_t ival = strtoll( ptr, &endptr, 0 );
elem->setValue(FileNode::INT, &ival);
}