summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2023-03-06 16:22:25 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2023-03-06 16:22:25 -0400
commit1de4d06c2211bd19b2833f9ea684ee1126047950 (patch)
treeda4bd8677f94d0d6d887d442bdb5470fd186ea42
parent06d75ece6452a33f11afd7e5ec3dd1f916c8583f (diff)
TProtocol: Disable inlining completely
It's a good start to do it here, and work our way to other parts of the codebase.
-rw-r--r--Makefile2
-rw-r--r--context.h2
-rw-r--r--include/pso/TProtocol.h2
-rw-r--r--src/pso/TProtocol.cpp5
4 files changed, 4 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 56c9c05..b7ac205 100644
--- a/Makefile
+++ b/Makefile
@@ -43,6 +43,8 @@ CXXFLAGS := $(CFLAGS_BASE) -Cpp_exceptions off -RTTI off
include obj_files.mk
+$(BUILD_DIR)/src/pso/TProtocol.o: CXXFLAGS += -inline none
+
ALL_DIRS := $(sort $(dir $(O_FILES)))
default: all
diff --git a/context.h b/context.h
index 497c12b..42f6b99 100644
--- a/context.h
+++ b/context.h
@@ -1319,7 +1319,7 @@ public:
virtual void run_task();
virtual short send(u8 *data, size_t size);
- void some_stub();
+ void some_stub() {};
int handle_command(struct packet *pkt);
void parse_packet();
diff --git a/include/pso/TProtocol.h b/include/pso/TProtocol.h
index 6cd2a9e..4a1d05a 100644
--- a/include/pso/TProtocol.h
+++ b/include/pso/TProtocol.h
@@ -104,7 +104,7 @@ public:
virtual void run_task();
virtual short send(u8 *data, size_t size);
- void some_stub();
+ void some_stub() {};
int handle_command(struct packet *pkt);
void parse_packet();
diff --git a/src/pso/TProtocol.cpp b/src/pso/TProtocol.cpp
index d30df7d..e3c45a9 100644
--- a/src/pso/TProtocol.cpp
+++ b/src/pso/TProtocol.cpp
@@ -90,8 +90,6 @@ void TProtocol::run_task() {
}
}
-void TProtocol::some_stub() {};
-
TProtocol::~TProtocol() {
}
@@ -99,7 +97,6 @@ TProtocol::~TProtocol() {
#define fill_with(name, value) memset(&m_##name, value, sizeof(m_##name))
#define copy(name) strncpy(m_##name.m_data, name, sizeof(m_##name.m_data))
-#pragma dont_inline on
TProtocol::TProtocol(TObject *parent, u16 sub_version, int language, char *serial_number, char *access_key, char *password) : TTcpSocket(parent) {
u8 thing[6];
m_name = TProtocol_name;
@@ -189,7 +186,5 @@ TProtocol::TProtocol(TObject *parent, u16 sub_version, int language, char *seria
m_recv_handlers.m_data[48] = nullptr;
}
-void dummy();
-#pragma dont_inline off
#undef fill_with
#undef copy