Skip to content

Commit

Permalink
fuck every aspect of this
Browse files Browse the repository at this point in the history
  • Loading branch information
Arisotura committed Nov 5, 2023
1 parent 11c22f0 commit 0aff947
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/NDSCart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1741,8 +1741,6 @@ std::unique_ptr<CartCommon> ParseROM(const u8* romdata, u32 romlen)
return cart;
}

// Why a move function? Because the Cart object is polymorphic,
// and cloning polymorphic objects without knowing the underlying type is annoying.
bool InsertROM(std::unique_ptr<CartCommon>&& cart)
{
if (!cart) {
Expand All @@ -1753,6 +1751,8 @@ bool InsertROM(std::unique_ptr<CartCommon>&& cart)
if (Cart)
EjectCart();

// Why a move function? Because the Cart object is polymorphic,
// and cloning polymorphic objects without knowing the underlying type is annoying.
Cart = std::move(cart);

Cart->Reset();
Expand Down
4 changes: 2 additions & 2 deletions src/WifiAP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ bool MACEqual(u8* a, const u8* b);
bool MACIsBroadcast(u8* a);


WifiAP::WifiAP(class Wifi* wifi) : Wifi(wifi)
WifiAP::WifiAP(Wifi* client) : Client(client)
{
}

Expand Down Expand Up @@ -368,7 +368,7 @@ int WifiAP::RecvPacket(u8* data)
// check destination MAC
if (!MACIsBroadcast(&LANBuffer[0]))
{
if (!MACEqual(&LANBuffer[0], Wifi->GetMAC()))
if (!MACEqual(&LANBuffer[0], Client->GetMAC()))
return 0;
}

Expand Down
4 changes: 2 additions & 2 deletions src/WifiAP.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Wifi;
class WifiAP
{
public:
WifiAP(Wifi* wifi);
WifiAP(Wifi* client);
~WifiAP();
void Reset();

Expand All @@ -40,7 +40,7 @@ class WifiAP
int RecvPacket(u8* data);

private:
class Wifi* Wifi;
Wifi* Client;

u64 USCounter;

Expand Down

0 comments on commit 0aff947

Please sign in to comment.