mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Builds and runs on both windows and ubuntu
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ if(MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
|
||||
endif()
|
||||
else() #if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-switch -Wno-nested-anon-types -Wno-gnu-anonymous-struct -Wno-unknown-pragmas -Wno-zero-length-array")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-switch -Wno-unknown-pragmas")
|
||||
endif()
|
||||
|
||||
# doxygen
|
||||
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
Error = 0x30
|
||||
};
|
||||
|
||||
APIEvent() : eventStruct({}), device(nullptr), serial(), timepoint() {}
|
||||
APIEvent() : eventStruct({}), serial(), timepoint(), device(nullptr) {}
|
||||
APIEvent(APIEvent::Type event, APIEvent::Severity severity, const Device* device = nullptr);
|
||||
|
||||
const neoevent_t* getNeoEvent() const noexcept { return &eventStruct; }
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
}
|
||||
void add(APIEvent::Type type, APIEvent::Severity severity, const Device* forDevice = nullptr) {
|
||||
std::lock_guard<std::mutex> lk(mutex);
|
||||
add_internal(APIEvent::APIEvent(type, severity, forDevice));
|
||||
add_internal(APIEvent(type, severity, forDevice));
|
||||
}
|
||||
|
||||
void discard(EventFilter filter = EventFilter());
|
||||
|
||||
@@ -33,7 +33,7 @@ std::vector<PCAP::PCAPFoundDevice> PCAP::FindAll() {
|
||||
}
|
||||
|
||||
if(!success) {
|
||||
EventManager::GetInstance().add(APIEvent::PCAPCouldNotFindDevices);
|
||||
EventManager::GetInstance().add(APIEvent::Type::PCAPCouldNotFindDevices, APIEvent::Severity::Error);
|
||||
return std::vector<PCAPFoundDevice>();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user