fix delete operator() for Event
Some checks failed
rpcrypto-build / build (Debug, hisiv510.toolchain.cmake) (push) Successful in 55s
rpcrypto-build / build (Release, himix200.toolchain.cmake) (push) Successful in 1m11s
rpcrypto-build / build (Debug, himix200.toolchain.cmake) (push) Successful in 1m8s
linux-x64-gcc / linux-gcc (push) Failing after 1m22s
rpcrypto-build / build (Release, hisiv510.toolchain.cmake) (push) Successful in 1m29s
linux-mips64-gcc / linux-gcc-mips64el (push) Failing after 1m5s
linux-hisiv500-gcc / linux-gcc-hisiv500 (push) Successful in 1m18s

This commit is contained in:
tqcq 2023-12-13 13:13:31 +08:00
parent e370bc2e35
commit 334c1d9572
3 changed files with 2 additions and 10 deletions

View File

@ -49,16 +49,10 @@ ulib::Event::Wait(int give_up_after_ms)
} }
} }
bool
ulib::Event::operator()() const
{
return event_status_;
}
ulib::Event::IsEventSetChecker::IsEventSetChecker(const ulib::Event &event) : event_(event) {} ulib::Event::IsEventSetChecker::IsEventSetChecker(const ulib::Event &event) : event_(event) {}
bool bool
ulib::Event::IsEventSetChecker::operator()() ulib::Event::IsEventSetChecker::operator()() const
{ {
return event_.event_status_; return event_.event_status_;
} }

View File

@ -23,13 +23,12 @@ public:
* @return * @return
*/ */
bool Wait(int give_up_after_ms = -1); bool Wait(int give_up_after_ms = -1);
bool operator()() const;
private: private:
class IsEventSetChecker { class IsEventSetChecker {
public: public:
IsEventSetChecker(const Event &); IsEventSetChecker(const Event &);
bool operator()(); bool operator()() const;
private: private:
const Event &event_; const Event &event_;

View File

@ -10,7 +10,6 @@ class EventTest : public ::testing::Test {
public: public:
void SetUp() override void SetUp() override
{ {
EXPECT_FALSE(event_());
EXPECT_FALSE(event_.Wait(100)); EXPECT_FALSE(event_.Wait(100));
consumer_count_ = 0; consumer_count_ = 0;