Stop saying "typedef struct" and "typedef enum".
Seeing new instances of this C-ism go in makes me a sad panda.
Change-Id: Ie3dd414b8b5e57a4164e88eb2d8559545569628d
diff --git a/jdwpspy/Common.h b/jdwpspy/Common.h
index f942dee..0bd3056 100644
--- a/jdwpspy/Common.h
+++ b/jdwpspy/Common.h
@@ -93,7 +93,7 @@
* "mem" mode shows the actual memory address, and will offset the start
* so that the low nibble of the address is always zero.
*/
-typedef enum { kHexDumpLocal, kHexDumpMem } HexDumpMode;
+enum HexDumpMode { kHexDumpLocal, kHexDumpMem };
void printHexDump(const void* vaddr, size_t length);
void printHexDump2(const void* vaddr, size_t length, const char* prefix);
void printHexDumpEx(FILE* fp, const void* vaddr, size_t length,
diff --git a/jdwpspy/Net.cpp b/jdwpspy/Net.cpp
index 209cf28..abcae21 100644
--- a/jdwpspy/Net.cpp
+++ b/jdwpspy/Net.cpp
@@ -33,7 +33,7 @@
/*
* Information about the remote end.
*/
-typedef struct Peer {
+struct Peer {
char label[2]; /* 'D' or 'V' */
int sock;
@@ -41,13 +41,13 @@
int inputCount;
bool awaitingHandshake; /* waiting for "JDWP-Handshake" */
-} Peer;
+};
/*
* Network state.
*/
-typedef struct NetState {
+struct NetState {
/* listen here for connection from debugger */
int listenSock;
@@ -57,16 +57,16 @@
Peer dbg;
Peer vm;
-} NetState;
+};
/*
* Function names.
*/
-typedef struct {
+struct JdwpHandlerMap {
u1 cmdSet;
u1 cmd;
const char* descr;
-} JdwpHandlerMap;
+};
/*
* Map commands to names.