diff options
| author | Alexander Gavrilov | 2012-03-17 12:52:22 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-03-17 12:52:22 +0400 |
| commit | 58eb199036db3662ec2f7a2d6d301e7f432d5639 (patch) | |
| tree | c01d46ab4d403cd900ddbf6e0c31c22946c02a7c /plugins/jobutils.cpp | |
| parent | 14d6a62e1d212808623f1a71b3c559ac4a8dada3 (diff) | |
| download | dfhack-58eb199036db3662ec2f7a2d6d301e7f432d5639.tar.gz dfhack-58eb199036db3662ec2f7a2d6d301e7f432d5639.tar.bz2 dfhack-58eb199036db3662ec2f7a2d6d301e7f432d5639.tar.xz | |
Add many new template functions for enums & bitfields.
An incompatible change: ENUM_KEY_STR returns std::string now.
The old behavior is available via enum_item_key_str function.
Diffstat (limited to 'plugins/jobutils.cpp')
| -rw-r--r-- | plugins/jobutils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/jobutils.cpp b/plugins/jobutils.cpp index ca234423..603346c3 100644 --- a/plugins/jobutils.cpp +++ b/plugins/jobutils.cpp @@ -146,7 +146,7 @@ static command_result job_material_in_job(color_ostream &out, MaterialInfo &new_ if (new_mat.getCraftClass() != old_class) { out.printerr("New material %s does not satisfy requirement: %s\n", - new_mat.toString().c_str(), ENUM_KEY_STR(craft_material_class, old_class)); + new_mat.toString().c_str(), ENUM_KEY_STR(craft_material_class, old_class).c_str()); return CR_FAILURE; } @@ -277,7 +277,7 @@ static command_result job_duplicate(color_ostream &out, vector <string> & parame job->job_type != job_type::CollectSand && job->job_type != job_type::CollectClay)) { - out.printerr("Cannot duplicate job %s\n", ENUM_KEY_STR(job_type,job->job_type)); + out.printerr("Cannot duplicate job %s\n", ENUM_KEY_STR(job_type,job->job_type).c_str()); return CR_FAILURE; } |
