mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-11-01 12:57:52 +00:00
gc_poller: Get rid of undefined behavior in Create()
Ensures that the function always has returns in all control paths.
This commit is contained in:
parent
a8ba6dc3c9
commit
839c91cd14
1 changed files with 4 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
#include "common/assert.h"
|
||||||
#include "common/threadsafe_queue.h"
|
#include "common/threadsafe_queue.h"
|
||||||
#include "input_common/gcadapter/gc_adapter.h"
|
#include "input_common/gcadapter/gc_adapter.h"
|
||||||
#include "input_common/gcadapter/gc_poller.h"
|
#include "input_common/gcadapter/gc_poller.h"
|
||||||
|
@ -94,6 +95,9 @@ std::unique_ptr<Input::ButtonDevice> GCButtonFactory::Create(const Common::Param
|
||||||
return std::make_unique<GCAxisButton>(port, axis, threshold, trigger_if_greater,
|
return std::make_unique<GCAxisButton>(port, axis, threshold, trigger_if_greater,
|
||||||
adapter.get());
|
adapter.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UNREACHABLE();
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::ParamPackage GCButtonFactory::GetNextInput() {
|
Common::ParamPackage GCButtonFactory::GetNextInput() {
|
||||||
|
|
Loading…
Reference in a new issue