MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / Search

Method Search

source/application/discord/lobby_manager.cpp:453–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451}
452
453void LobbyManager::Search(LobbySearchQuery const& query, std::function<void(Result)> callback)
454{
455 static auto wrapper = [](void* callbackData, EDiscordResult result) -> void {
456 std::unique_ptr<std::function<void(Result)>> cb(
457 reinterpret_cast<std::function<void(Result)>*>(callbackData));
458 if (!cb || !(*cb)) {
459 return;
460 }
461 (*cb)(static_cast<Result>(result));
462 };
463 std::unique_ptr<std::function<void(Result)>> cb{};
464 cb.reset(new std::function<void(Result)>(std::move(callback)));
465 internal_->search(
466 internal_, const_cast<LobbySearchQuery&>(query).Internal(), cb.release(), wrapper);
467}
468
469void LobbyManager::LobbyCount(std::int32_t* count)
470{

Callers

nothing calls this directly

Calls 4

searchMethod · 0.80
releaseMethod · 0.80
resetMethod · 0.45
InternalMethod · 0.45

Tested by

no test coverage detected