most of the changes needed to build native on Windows

1.2-legacy
Kevin Hester 2021-05-25 05:08:57 +08:00
rodzic 4e8e85c9f1
commit abe95ae1a4
6 zmienionych plików z 4 dodań i 11 usunięć

Wyświetl plik

@ -7,8 +7,6 @@
#include <time.h>
#include <cstring>
using namespace std;
/**
* A printer that doesn't go anywhere
*/

Wyświetl plik

@ -44,8 +44,6 @@ class Screen
#define BRIGHTNESS_DEFAULT 150
#endif
using namespace std;
namespace graphics
{

Wyświetl plik

@ -4,8 +4,6 @@
#include <queue>
#include <unordered_set>
using namespace std;
/// We clear our old flood record five minute after we see the last of it
#define FLOOD_EXPIRE_TIME (5 * 60 * 1000L)
@ -23,7 +21,7 @@ struct PacketRecord {
class PacketRecordHashFunction
{
public:
size_t operator()(const PacketRecord &p) const { return (hash<NodeNum>()(p.sender)) ^ (hash<PacketId>()(p.id)); }
size_t operator()(const PacketRecord &p) const { return (std::hash<NodeNum>()(p.sender)) ^ (std::hash<PacketId>()(p.id)); }
};
/// Order packet records by arrival time, we want the oldest packets to be in the front of our heap
@ -54,7 +52,7 @@ class PacketHistory
/** FIXME: really should be a std::unordered_set with the key being sender,id.
* This would make checking packets in wasSeenRecently faster.
*/
vector<PacketRecord> recentPackets;
std::vector<PacketRecord> recentPackets;
// priority_queue<PacketRecord, vector<PacketRecord>, PacketRecordOrderFunction> arrivalTimes;
// unordered_set<PacketRecord, PacketRecordHashFunction> recentPackets;

Wyświetl plik

@ -51,7 +51,7 @@ struct PendingPacket {
class GlobalPacketIdHashFunction
{
public:
size_t operator()(const GlobalPacketId &p) const { return (hash<NodeNum>()(p.node)) ^ (hash<PacketId>()(p.id)); }
size_t operator()(const GlobalPacketId &p) const { return (std::hash<NodeNum>()(p.node)) ^ (std::hash<PacketId>()(p.id)); }
};
/**
@ -60,7 +60,7 @@ class GlobalPacketIdHashFunction
class ReliableRouter : public FloodingRouter
{
private:
unordered_map<GlobalPacketId, PendingPacket, GlobalPacketIdHashFunction> pending;
std::unordered_map<GlobalPacketId, PendingPacket, GlobalPacketIdHashFunction> pending;
public:
/**

Wyświetl plik

@ -1 +0,0 @@
../nrf52/wifi-stubs.cpp