diff options
| author | Alexander Gavrilov | 2012-03-18 11:04:15 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-03-18 11:04:15 +0400 |
| commit | b9ecd03fe2c4013a57f30ada6534a248b27b7515 (patch) | |
| tree | fe42dc901accb7cdea3319d9f3b1de5da46943c4 /plugins/rename.cpp | |
| parent | 293eb53677ebcb5fb5db83b6a3df99ba635fe6af (diff) | |
| download | dfhack-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.cpp | 4 |
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; |
