Remove default argument for callbacks, reorder function arguments

This commit is contained in:
Tim Wojtulewicz 2025-03-10 13:51:05 -07:00
parent 605973497f
commit e6f1eea1b7
11 changed files with 72 additions and 75 deletions

View file

@ -73,9 +73,9 @@ zeek::expected<BackendPtr, std::string> Manager::Instantiate(const Tag& type) {
return bp;
}
OperationResult Manager::OpenBackend(BackendPtr backend, RecordValPtr options, TypePtr key_type, TypePtr val_type,
OpenResultCallback* cb) {
auto res = backend->Open(std::move(options), std::move(key_type), std::move(val_type), cb);
OperationResult Manager::OpenBackend(BackendPtr backend, OpenResultCallback* cb, RecordValPtr options, TypePtr key_type,
TypePtr val_type) {
auto res = backend->Open(cb, std::move(options), std::move(key_type), std::move(val_type));
if ( res.code != ReturnCode::SUCCESS && res.code != ReturnCode::IN_PROGRESS ) {
res.err_str = util::fmt("Failed to open backend %s: %s", backend->Tag(), res.err_str.c_str());
return res;