mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:08:11 +00:00
LibCore: Fix errors when compiling LibCore using clang instead of gcc
This commit is contained in:
parent
250f6b9a1e
commit
aab412bd85
3 changed files with 7 additions and 2 deletions
|
@ -241,8 +241,9 @@ void CEventLoop::pump(WaitMode mode)
|
||||||
|
|
||||||
for (int i = 0; i < events.size(); ++i) {
|
for (int i = 0; i < events.size(); ++i) {
|
||||||
auto& queued_event = events.at(i);
|
auto& queued_event = events.at(i);
|
||||||
|
#ifndef __clang__
|
||||||
ASSERT(queued_event.event);
|
ASSERT(queued_event.event);
|
||||||
|
#endif
|
||||||
auto* receiver = queued_event.receiver.ptr();
|
auto* receiver = queued_event.receiver.ptr();
|
||||||
auto& event = *queued_event.event;
|
auto& event = *queued_event.event;
|
||||||
#ifdef CEVENTLOOP_DEBUG
|
#ifdef CEVENTLOOP_DEBUG
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include <LibCore/CObject.h>
|
#include <LibCore/CObject.h>
|
||||||
|
|
||||||
class CIODevice : public CObject {
|
class CIODevice : public CObject {
|
||||||
C_OBJECT(CIODevice)
|
C_OBJECT_ABSTRACT(CIODevice)
|
||||||
public:
|
public:
|
||||||
enum OpenMode {
|
enum OpenMode {
|
||||||
NotOpen = 0,
|
NotOpen = 0,
|
||||||
|
|
|
@ -26,6 +26,10 @@ public: \
|
||||||
{ \
|
{ \
|
||||||
return adopt(*new klass(forward<Args>(args)...)); \
|
return adopt(*new klass(forward<Args>(args)...)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define C_OBJECT_ABSTRACT(klass) \
|
||||||
|
public: \
|
||||||
|
virtual const char* class_name() const override { return #klass; }
|
||||||
|
|
||||||
class CObject
|
class CObject
|
||||||
: public RefCounted<CObject>
|
: public RefCounted<CObject>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue