Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused parameters in support lib #165

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions support-lib/objc/DJOutcome.mm
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ @implementation DJOutcome {
}
-(instancetype)initWithResult:(id)result {
if (self = [super init]) {
self->_accessor = ^(HANDLER resultHandler, HANDLER errorHandler) {return resultHandler(result);};}
self->_accessor = ^(HANDLER resultHandler, HANDLER) {return resultHandler(result);};}
return self;
}
-(instancetype)initWithError:(id)error {
if (self = [super init]) {
self->_accessor = ^(HANDLER resultHandler, HANDLER errorHandler) {return errorHandler(error);};}
self->_accessor = ^(HANDLER, HANDLER errorHandler) {return errorHandler(error);};}
return self;
}
+(DJOutcome<id, id>*)fromResult:(id)result {
Expand All @@ -42,14 +42,14 @@ -(id)matchResult:(HANDLER) resultHandler Error:(HANDLER) errorHandler {
}
-(id)result {
return _accessor(^(id result){ return result; },
^(id error) { return (id)nil; });
^(id) { return (id)nil; });
}
-(id)resultOr:(id)defaultResult {
return _accessor(^(id result){ return result; },
^(id error) { return defaultResult; });
^(id) { return defaultResult; });
}
-(id)error {
return _accessor(^(id result){ return (id)nil; },
return _accessor(^(id){ return (id)nil; },
^(id error) { return error; });
}
- (NSString *)description {
Expand Down
2 changes: 1 addition & 1 deletion support-lib/objc/DataRef_objc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class DataRefObjc : public DataRef::Impl {
auto buf = reinterpret_cast<const uint8_t*>(p->data());
auto len = p->size();
context.info = p;
context.deallocate = [](void* ptr, void* info) {
context.deallocate = [](void*, void* info) {
// delete the wrapped object
auto* p = reinterpret_cast<DataObj*>(info);
delete p;
Expand Down
Loading