Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Objc binding#17165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
alalek merged 35 commits intoopencv:masterfromkomakai:objc-binding
Jun 8, 2020
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
35 commits
Select commitHold shift + click to select a range
084c1e4
Initial work on Objective-C wrapper
komakaiDec 14, 2019
c6ced21
Objective-C generator script; update manually generated wrappers
komakaiJan 19, 2020
c30a089
Add Mat tests
komakaiJan 27, 2020
319f04d
Core Tests
komakaiFeb 1, 2020
578a86f
Imgproc wrapper generation and tests
komakaiFeb 10, 2020
e7d7bc4
Fixes for Imgcodecs wrapper
komakaiFeb 11, 2020
46ffdeb
Miscellaneous fixes. Swift build support
komakaiFeb 17, 2020
7ba365d
Objective-C wrapper build/install
komakaiMar 1, 2020
2247a78
Add Swift wrappers for videoio/objdetect/feature2d
komakaiMar 8, 2020
df4a65f
Framework build;iOS support
komakaiApr 4, 2020
8a92359
Fix toArray functions;Use enum types whenever possible
komakaiApr 11, 2020
6b230bf
Use enum types where possible;prepare test build
komakaiApr 16, 2020
1fb51ff
Update test
komakaiApr 18, 2020
543636f
Add test runner scripts for iOS and macOS
komakaiApr 22, 2020
251ac05
Add test scripts and samples
komakaiApr 26, 2020
ae5e242
Build fixes
komakaiApr 28, 2020
4eb5ef0
Fix build (cmake 3.17.x compatibility)
komakaiApr 29, 2020
2ee6ac0
Fix warnings
komakaiApr 29, 2020
a11a9a4
Fix enum name conflicting handling
komakaiMay 2, 2020
1fa3cf1
Add support for document generation with Jazzy
komakaiMay 10, 2020
f0ee281
Swift/Native fast accessor functions
komakaiMay 17, 2020
37dddff
Add Objective-C wrapper for calib3d, dnn, ml, photo and video modules
komakaiMay 28, 2020
11ce9a9
Remove IntOut/FloatOut/DoubleOut classes
komakaiMay 28, 2020
999fe0b
Fix iOS default test platform value
komakaiMay 30, 2020
33fd852
Fix samples
komakaiMay 31, 2020
6e6b7aa
Revert default framework name to opencv2
komakaiMay 31, 2020
4100776
Add converter util functions
komakaiJun 2, 2020
4561731
Fix failing test
komakaiJun 2, 2020
e460c21
Fix whitespace
komakaiJun 2, 2020
a1336cc
Add handling for deprecated methods;fix warnings;define __OPENCV_BUILD
komakaiJun 3, 2020
bd55a58
Suppress cmake warnings
komakaiJun 4, 2020
741a400
Reduce severity of "jazzy not found" log message
komakaiJun 6, 2020
ed4c0cd
Fix incorrect #include of compatibility header in ios.h
komakaiJun 6, 2020
fdbda57
Use explicit returns in subscript/get implementation
komakaiJun 8, 2020
192d825
Reduce minimum required cmake version to 3.15 for Objective-C/Swift b…
komakaiJun 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Miscellaneous fixes. Swift build support
  • Loading branch information
@komakai
komakai committedMay 30, 2020
commit46ffdeb13600221ccf9e66a61d253633e82856c0
1 change: 1 addition & 0 deletionscmake/OpenCVModule.cmake
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -788,6 +788,7 @@ macro(ocv_glob_module_sources)
if (APPLE)
file(GLOB_RECURSE lib_srcs_apple
"${CMAKE_CURRENT_LIST_DIR}/src/*.mm"
"${CMAKE_CURRENT_LIST_DIR}/src/*.swift"
)
list(APPEND lib_srcs ${lib_srcs_apple})
endif()
Expand Down
2 changes: 1 addition & 1 deletionmodules/core/misc/objc/src/ByteVector.mm
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -63,7 +63,7 @@ +(instancetype)fromNative:(std::vector<SInt8>&)src {
}

-(SInt8)get:(NSInteger)index {
if (index < 0 || index >= v.size()) {
if (index < 0 || index >=(long)v.size()) {
@throw [NSException exceptionWithName:NSRangeException reason:@"Invalid data length" userInfo:nil];
}
return v[index];
Expand Down
6 changes: 3 additions & 3 deletionsmodules/core/misc/objc/src/CVObjcUtil.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -41,7 +41,7 @@ template <typename CV, typename CV_RAW, typename OBJC> std::vector<CV> objc2cv_c

template <typename CV, typename OBJC> void cv2objc(std::vector<CV>& vector, NSMutableArray<OBJC*>* _Nonnull array, OBJC* _Nonnull (* _Nonnull converter)(CV&)) {
[array removeAllObjects];
for (int index = 0; index < vector.size(); index++) {
for (size_t index = 0; index < vector.size(); index++) {
[array addObject:converter(vector[index])];
}
}
Expand DownExpand Up@@ -82,10 +82,10 @@ template <typename CV, typename CV_RAW, typename OBJC> std::vector<std::vector<C

template <typename CV, typename OBJC> void cv2objc2(std::vector<std::vector<CV>>& vector, NSMutableArray<NSMutableArray<OBJC*>*>* _Nonnull array, OBJC* _Nonnull (* _Nonnull converter)(CV&)) {
[array removeAllObjects];
for (int index = 0; index < vector.size(); index++) {
for (size_t index = 0; index < vector.size(); index++) {
std::vector<CV>& innerVector = vector[index];
NSMutableArray<OBJC*>* innerArray = [NSMutableArray arrayWithCapacity:innerVector.size()];
for (int index2 = 0; index2 < innerVector.size(); index2++) {
for (size_t index2 = 0; index2 < innerVector.size(); index2++) {
[innerArray addObject:converter(innerVector[index2])];
}
[array addObject:innerArray];
Expand Down
2 changes: 1 addition & 1 deletionmodules/core/misc/objc/src/DoubleVector.mm
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,7 +65,7 @@ +(instancetype)fromNative:(std::vector<double>&)src {
}

-(double)get:(NSInteger)index {
if (index < 0 || index >= v.size()) {
if (index < 0 || index >=(long)v.size()) {
@throw [NSException exceptionWithName:NSRangeException reason:@"Invalid data length" userInfo:nil];
}
return v[index];
Expand Down
4 changes: 4 additions & 0 deletionsmodules/core/misc/objc/src/Float4.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,8 @@

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@class Mat;

@interface Float4 : NSObject
Expand All@@ -36,3 +38,5 @@
-(BOOL)isEqual:(nullable id)other;

@end

NS_ASSUME_NONNULL_END
4 changes: 4 additions & 0 deletionsmodules/core/misc/objc/src/Float6.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,8 @@

@class Mat;

NS_ASSUME_NONNULL_BEGIN

@interface Float6 : NSObject

@property float v0;
Expand All@@ -38,3 +40,5 @@
-(BOOL)isEqual:(nullable id)other;

@end

NS_ASSUME_NONNULL_END
2 changes: 1 addition & 1 deletionmodules/core/misc/objc/src/FloatVector.mm
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -63,7 +63,7 @@ +(instancetype)fromNative:(std::vector<float>&)src {
}

-(float)get:(NSInteger)index {
if (index < 0 || index >= v.size()) {
if (index < 0 || index >=(long)v.size()) {
@throw [NSException exceptionWithName:NSRangeException reason:@"Invalid data length" userInfo:nil];
}
return v[index];
Expand Down
4 changes: 4 additions & 0 deletionsmodules/core/misc/objc/src/Int4.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,8 @@

@class Mat;

NS_ASSUME_NONNULL_BEGIN

@interface Int4 : NSObject

@property int v0;
Expand All@@ -36,3 +38,5 @@
-(BOOL)isEqual:(nullable id)other;

@end

NS_ASSUME_NONNULL_END
4 changes: 4 additions & 0 deletionsmodules/core/misc/objc/src/IntOut.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,10 +8,14 @@

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface IntOut : NSObject

@property(readonly) int val;

-(int*)ptr;

@end

NS_ASSUME_NONNULL_END
2 changes: 1 addition & 1 deletionmodules/core/misc/objc/src/IntVector.mm
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -63,7 +63,7 @@ +(instancetype)fromNative:(std::vector<int>&)src {
}

-(int)get:(NSInteger)index {
if (index < 0 || index >= v.size()) {
if (index < 0 || index >=(long)v.size()) {
@throw [NSException exceptionWithName:NSRangeException reason:@"Invalid data length" userInfo:nil];
}
return v[index];
Expand Down
6 changes: 3 additions & 3 deletionsmodules/core/misc/objc/src/KeyPoint.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
//
//Range.h
//KeyPoint.h
//
// Created by Giles Payne on 2019/10/08.
// Copyright © 2019 Xtravision. All rights reserved.
Expand All@@ -13,13 +13,13 @@

#import <Foundation/Foundation.h>

@classCVPoint;
@classPoint2f;

NS_ASSUME_NONNULL_BEGIN

@interface KeyPoint : NSObject

@property CVPoint* pt;
@property(assign) Point2f* pt;
@property float size;
@property float angle;
@property float response;
Expand Down
28 changes: 14 additions & 14 deletionsmodules/core/misc/objc/src/Mat.mm
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,11 +6,11 @@
//

#import "Mat.h"
#import "CVSize.h"
#import "Size2i.h"
#import "Scalar.h"
#import "Range.h"
#import "CVRect.h"
#import "CVPoint.h"
#import "Rect2i.h"
#import "Point2i.h"
#import "CvType.h"
#import "CVObjcUtil.h"

Expand DownExpand Up@@ -90,7 +90,7 @@ - (instancetype)initWithRows:(int)rows cols:(int)cols type:(int)type data:(NSDat
return self;
}

- (instancetype)initWithSize:(CVSize*)size type:(int)type {
- (instancetype)initWithSize:(Size2i*)size type:(int)type {
self = [super init];
if (self) {
_nativePtr = new cv::Mat(size.width, size.height, type);
Expand DownExpand Up@@ -119,7 +119,7 @@ - (instancetype)initWithRows:(int)rows cols:(int)cols type:(int)type scalar:(Sca
return self;
}

- (instancetype)initWithSize:(CVSize*)size type:(int)type scalar:(Scalar *)scalar {
- (instancetype)initWithSize:(Size2i*)size type:(int)type scalar:(Scalar *)scalar {
self = [super init];
if (self) {
cv::Scalar scalerTemp(scalar.val[0].doubleValue, scalar.val[1].doubleValue, scalar.val[2].doubleValue, scalar.val[3].doubleValue);
Expand DownExpand Up@@ -172,7 +172,7 @@ - (instancetype)initWithMat:(Mat*)mat ranges:(NSArray<Range*>*)ranges {
return self;
}

- (instancetype)initWithMat:(Mat*)mat rect:(CVRect*)roi {
- (instancetype)initWithMat:(Mat*)mat rect:(Rect2i*)roi {
self = [super init];
if (self) {
cv::Range rows(roi.y, roi.y + roi.height);
Expand DownExpand Up@@ -263,7 +263,7 @@ - (void)create:(int)rows cols:(int)cols type:(int)type {
_nativePtr->create(rows, cols, type);
}

- (void)create:(CVSize*)size type:(int)type {
- (void)create:(Size2i*)size type:(int)type {
cv::Size tempSize(size.width, size.height);
_nativePtr->create(tempSize, type);
}
Expand DownExpand Up@@ -320,7 +320,7 @@ + (Mat*)eye:(int)rows cols:(int)cols type:(int)type {
return [[Mat alloc] initWithNativeMat:new cv::Mat(cv::Mat::eye(rows, cols, type))];
}

+ (Mat*)eye:(CVSize*)size type:(int)type {
+ (Mat*)eye:(Size2i*)size type:(int)type {
cv::Size tempSize(size.width, size.height);
return [[Mat alloc] initWithNativeMat:new cv::Mat(cv::Mat::eye(tempSize, type))];
}
Expand All@@ -341,7 +341,7 @@ - (BOOL)isSubmatrix {
return _nativePtr->isSubmatrix();
}

- (void)locateROI:(CVSize*)wholeSize ofs:(CVPoint*)ofs {
- (void)locateROI:(Size2i*)wholeSize ofs:(Point2i*)ofs {
cv::Size tempWholeSize;
cv::Point tempOfs;
_nativePtr->locateROI(tempWholeSize, tempOfs);
Expand All@@ -367,7 +367,7 @@ + (Mat*)ones:(int)rows cols:(int)cols type:(int)type {
return [[Mat alloc] initWithNativeMat:new cv::Mat(cv::Mat::ones(rows, cols, type))];
}

+ (Mat*)ones:(CVSize*)size type:(int)type {
+ (Mat*)ones:(Size2i*)size type:(int)type {
cv::Size tempSize(size.width, size.height);
return [[Mat alloc] initWithNativeMat:new cv::Mat(cv::Mat::ones(tempSize, type))];
}
Expand DownExpand Up@@ -434,8 +434,8 @@ - (Mat*)setToValue:(Mat*)value {
return [[Mat alloc] initWithNativeMat:new cv::Mat(_nativePtr->setTo(*(cv::Mat*)value.nativePtr))];
}

- (CVSize*)size {
return [[CVSize alloc] initWithWidth:_nativePtr->size().width height:_nativePtr->size().height];
- (Size2i*)size {
return [[Size2i alloc] initWithWidth:_nativePtr->size().width height:_nativePtr->size().height];
}

- (int)size:(int)dimIndex {
Expand DownExpand Up@@ -470,7 +470,7 @@ - (Mat*)submat:(NSArray<Range*>*)ranges {
return [[Mat alloc] initWithNativeMat:new cv::Mat(_nativePtr->operator()(tempRanges))];
}

- (Mat*)submatRoi:(CVRect*)roi {
- (Mat*)submatRoi:(Rect2i*)roi {
cv::Rect tempRoi(roi.x, roi.y, roi.width, roi.height);
return [[Mat alloc] initWithNativeMat:new cv::Mat(_nativePtr->operator()(tempRoi))];
}
Expand All@@ -491,7 +491,7 @@ + (Mat*)zeros:(int)rows cols:(int)cols type:(int)type {
return [[Mat alloc] initWithNativeMat:new cv::Mat(cv::Mat::zeros(rows, cols, type))];
}

+ (Mat*)zeros:(CVSize*)size type:(int)type {
+ (Mat*)zeros:(Size2i*)size type:(int)type {
cv::Size tempSize(size.width, size.height);
return [[Mat alloc] initWithNativeMat:new cv::Mat(cv::Mat::zeros(tempSize, type))];
}
Expand Down
2 changes: 1 addition & 1 deletionmodules/core/misc/objc/src/MatOfDMatch.mm
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,7 +49,7 @@ - (void)alloc:(int)elemNumber {

- (void)fromArray:(NSArray<DMatch*>*)array {
NSMutableArray<NSNumber*>* data = [[NSMutableArray alloc] initWithCapacity:array.count * _channels];
for (int index = 0; index < array.count; index++) {
for (int index = 0; index <(int)array.count; index++) {
data[_channels * index] = [NSNumber numberWithFloat:array[index].queryIdx];
data[_channels * index + 1] = [NSNumber numberWithFloat:array[index].trainIdx];
data[_channels * index + 2] = [NSNumber numberWithFloat:array[index].imgIdx];
Expand Down
2 changes: 1 addition & 1 deletionmodules/core/misc/objc/src/MatOfKeyPoint.mm
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -50,7 +50,7 @@ - (void)alloc:(int)elemNumber {

- (void)fromArray:(NSArray<KeyPoint*>*)array {
NSMutableArray<NSNumber*>* data = [[NSMutableArray alloc] initWithCapacity:array.count * _channels];
for (int index = 0; index < array.count; index++) {
for (int index = 0; index <(int)array.count; index++) {
data[_channels * index] = [NSNumber numberWithFloat:array[index].pt.x];
data[_channels * index + 1] = [NSNumber numberWithFloat:array[index].pt.y];
data[_channels * index + 2] = [NSNumber numberWithFloat:array[index].size];
Expand Down
2 changes: 1 addition & 1 deletionmodules/core/misc/objc/src/MatOfPoint.mm
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,7 +49,7 @@ - (void)alloc:(int)elemNumber {

- (void)fromArray:(NSArray<Point2i*>*)array {
NSMutableArray<NSNumber*>* data = [[NSMutableArray alloc] initWithCapacity:array.count * _channels];
for (int index = 0; index < array.count; index++) {
for (int index = 0; index <(int)array.count; index++) {
data[_channels * index] = [NSNumber numberWithInt:array[index].x];
data[_channels * index + 1] = [NSNumber numberWithInt:array[index].y];
}
Expand Down
2 changes: 1 addition & 1 deletionmodules/core/misc/objc/src/MatOfPoint2f.mm
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,7 +49,7 @@ - (void)alloc:(int)elemNumber {

- (void)fromArray:(NSArray<Point2f*>*)array {
NSMutableArray<NSNumber*>* data = [[NSMutableArray alloc] initWithCapacity:array.count * _channels];
for (int index = 0; index < array.count; index++) {
for (int index = 0; index <(int)array.count; index++) {
data[_channels * index] = [NSNumber numberWithFloat:array[index].x];
data[_channels * index + 1] = [NSNumber numberWithFloat:array[index].y];
}
Expand Down
2 changes: 1 addition & 1 deletionmodules/core/misc/objc/src/MatOfPoint3.mm
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,7 +49,7 @@ - (void)alloc:(int)elemNumber {

- (void)fromArray:(NSArray<Point3i*>*)array {
NSMutableArray<NSNumber*>* data = [[NSMutableArray alloc] initWithCapacity:array.count * _channels];
for (int index = 0; index < array.count; index++) {
for (int index = 0; index <(int)array.count; index++) {
data[_channels * index] = [NSNumber numberWithInt:array[index].x];
data[_channels * index + 1] = [NSNumber numberWithInt:array[index].y];
data[_channels * index + 2] = [NSNumber numberWithInt:array[index].z];
Expand Down
2 changes: 1 addition & 1 deletionmodules/core/misc/objc/src/MatOfPoint3f.mm
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,7 +49,7 @@ - (void)alloc:(int)elemNumber {

- (void)fromArray:(NSArray<Point3f*>*)array {
NSMutableArray<NSNumber*>* data = [[NSMutableArray alloc] initWithCapacity:array.count * _channels];
for (int index = 0; index < array.count; index++) {
for (int index = 0; index <(int)array.count; index++) {
data[_channels * index] = [NSNumber numberWithFloat:array[index].x];
data[_channels * index + 1] = [NSNumber numberWithFloat:array[index].y];
data[_channels * index + 2] = [NSNumber numberWithFloat:array[index].z];
Expand Down
2 changes: 1 addition & 1 deletionmodules/core/misc/objc/src/MatOfRect.mm
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,7 +49,7 @@ - (void)alloc:(int)elemNumber {

- (void)fromArray:(NSArray<Rect2i*>*)array {
NSMutableArray<NSNumber*>* data = [[NSMutableArray alloc] initWithCapacity:array.count * _channels];
for (int index = 0; index < array.count; index++) {
for (int index = 0; index <(int)array.count; index++) {
data[_channels * index] = [NSNumber numberWithInt:array[index].x];
data[_channels * index + 1] = [NSNumber numberWithInt:array[index].y];
data[_channels * index + 2] = [NSNumber numberWithInt:array[index].width];
Expand Down
2 changes: 1 addition & 1 deletionmodules/core/misc/objc/src/MatOfRect2d.mm
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -54,7 +54,7 @@ - (void)alloc:(int)elemNumber {

- (void)fromArray:(NSArray<Rect2d*>*)array {
NSMutableArray<NSNumber*>* data = [[NSMutableArray alloc] initWithCapacity:array.count * _channels];
for (int index = 0; index < array.count; index++) {
for (int index = 0; index <(int)array.count; index++) {
data[_channels * index] = [NSNumber numberWithDouble:array[index].x];
data[_channels * index + 1] = [NSNumber numberWithDouble:array[index].y];
data[_channels * index + 2] = [NSNumber numberWithDouble:array[index].width];
Expand Down
2 changes: 1 addition & 1 deletionmodules/core/misc/objc/src/MatOfRotatedRect.mm
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -51,7 +51,7 @@ - (void)alloc:(int)elemNumber {

- (void)fromArray:(NSArray<RotatedRect*>*)array {
NSMutableArray<NSNumber*>* data = [[NSMutableArray alloc] initWithCapacity:array.count * _channels];
for (int index = 0; index < array.count; index++) {
for (int index = 0; index <(int)array.count; index++) {
data[_channels * index] = [NSNumber numberWithFloat:array[index].center.x];
data[_channels * index + 1] = [NSNumber numberWithFloat:array[index].center.y];
data[_channels * index + 2] = [NSNumber numberWithFloat:array[index].size.width];
Expand Down
4 changes: 2 additions & 2 deletionsmodules/core/misc/objc/src/MinMaxLocResult.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,8 +20,8 @@ NS_ASSUME_NONNULL_BEGIN

@property double minVal;
@property double maxVal;
@property Point2i* minLoc;
@property Point2i* maxLoc;
@property(assign) Point2i* minLoc;
@property(assign) Point2i* maxLoc;

- (instancetype)init;
- (instancetype)initWithMinval:(double)minVal maxVal:(double)maxVal minLoc:(Point2i*)minLoc maxLoc:(Point2i*)maxLoc;
Expand Down
2 changes: 1 addition & 1 deletionmodules/core/misc/objc/src/Moments.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@
#pragma once

#ifdef __cplusplus
#import<opencv2/opencv.hpp>
#import"opencv2/opencv.hpp"
#endif

#import <Foundation/Foundation.h>
Expand Down
2 changes: 1 addition & 1 deletionmodules/core/misc/objc/src/ObjectVector.mm
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,7 +36,7 @@ -(instancetype)initWithArray:(NSArray<id>*)array {
}

-(id)get:(NSInteger)index {
if (index < 0 || index >= _array.count) {
if (index < 0 || index >=(long)_array.count) {
@throw [NSException exceptionWithName:NSRangeException reason:@"Invalid data length" userInfo:nil];
}
return _array[index];
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp