feat fix event_bus test
Some checks failed
linux-x64-gcc / linux-gcc (Debug) (push) Failing after 1m4s
linux-x64-gcc / linux-gcc (Release) (push) Failing after 1m2s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Failing after 1m21s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (push) Failing after 1m44s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Failing after 1m41s
linux-arm-gcc / linux-gcc-armhf (push) Failing after 1m57s
Some checks failed
linux-x64-gcc / linux-gcc (Debug) (push) Failing after 1m4s
linux-x64-gcc / linux-gcc (Release) (push) Failing after 1m2s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Failing after 1m21s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (push) Failing after 1m44s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Failing after 1m41s
linux-arm-gcc / linux-gcc-armhf (push) Failing after 1m57s
This commit is contained in:
parent
8bd904bfb6
commit
35e01dccd2
@ -97,7 +97,10 @@ private:
|
||||
|
||||
class EventBus {
|
||||
public:
|
||||
template<typename mt_policy = sigslot::multi_threaded_local>
|
||||
using MultiThreadedLocal = sigslot::multi_threaded_local;
|
||||
using MultiThreadedGlobal = sigslot::multi_threaded_global;
|
||||
|
||||
template<typename mt_policy = MultiThreadedLocal>
|
||||
using Subscriber = sigslot::has_slots<mt_policy>;
|
||||
|
||||
EventBus() = default;
|
||||
|
@ -13,7 +13,7 @@ struct AtomicEvent {
|
||||
std::atomic<int> &data;
|
||||
};
|
||||
|
||||
struct Subscriber : public sled::EventBus::Subscriber {
|
||||
struct Subscriber : public sled::EventBus::Subscriber<> {
|
||||
void OnEvent(Event event) { (*event.data)++; }
|
||||
|
||||
void OnAtomicnEvent(AtomicEvent event) { event.data.fetch_add(1); }
|
||||
|
@ -26,7 +26,7 @@ struct Event2 {
|
||||
std::string str;
|
||||
};
|
||||
|
||||
struct Subscriber : public sled::EventBus::Subscriber {
|
||||
struct Subscriber : public sled::EventBus::Subscriber<> {
|
||||
void OnEvent1(Event1 event) { a += event.a; }
|
||||
|
||||
void OnEvent2(Event2 event) { str += event.str; }
|
||||
|
@ -167,7 +167,7 @@ Base64::Decode(const uint8_t *ptr, size_t len)
|
||||
break;
|
||||
} else {
|
||||
// invalid character
|
||||
return make_status_or<std::string>(StatusCode::kInvalidArgument,
|
||||
return MakeStatusOr<std::string>(StatusCode::kInvalidArgument,
|
||||
fmt::format("Invalid character [{}] at index [{}]", (char) c, index));
|
||||
}
|
||||
++index;
|
||||
|
Loading…
Reference in New Issue
Block a user