summaryrefslogtreecommitdiff
path: root/plugins/rename.cpp
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-03-18 11:04:15 +0400
committerAlexander Gavrilov2012-03-18 11:04:15 +0400
commitb9ecd03fe2c4013a57f30ada6534a248b27b7515 (patch)
treefe42dc901accb7cdea3319d9f3b1de5da46943c4 /plugins/rename.cpp
parent293eb53677ebcb5fb5db83b6a3df99ba635fe6af (diff)
downloaddfhack-b9ecd03fe2c4013a57f30ada6534a248b27b7515.tar.gz
dfhack-b9ecd03fe2c4013a57f30ada6534a248b27b7515.tar.bz2
dfhack-b9ecd03fe2c4013a57f30ada6534a248b27b7515.tar.xz
Make the server suspend the core around calls unless disabled.
I expect the majority of methods will have to suspend the core first thing anyway, so this will reduce typing and bugs. Also get rid of the "me->" ugliness by splitting threadFn.
Diffstat (limited to 'plugins/rename.cpp')
-rw-r--r--plugins/rename.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/plugins/rename.cpp b/plugins/rename.cpp
index 9544901f..2384fbb3 100644
--- a/plugins/rename.cpp
+++ b/plugins/rename.cpp
@@ -124,8 +124,6 @@ void setUnitNickname(df::unit *unit, const std::string &nick)
static command_result RenameSquad(color_ostream &stream, const RenameSquadIn *in)
{
- CoreSuspender suspend;
-
df::squad *squad = df::squad::find(in->squad_id());
if (!squad)
return CR_NOT_FOUND;
@@ -140,8 +138,6 @@ static command_result RenameSquad(color_ostream &stream, const RenameSquadIn *in
static command_result RenameUnit(color_ostream &stream, const RenameUnitIn *in)
{
- CoreSuspender suspend;
-
df::unit *unit = df::unit::find(in->unit_id());
if (!unit)
return CR_NOT_FOUND;