diff options
| author | Alexander Gavrilov | 2012-03-17 13:09:22 +0400 |
|---|---|---|
| committer | Petr Mrázek | 2012-03-18 12:47:01 +0100 |
| commit | 719dbc048a55ba1def2ce21e9cd29e33dbe833ce (patch) | |
| tree | 7ba4f05e3e2beb41600d50f9a2fa20910da96887 /BlockCondition.cpp | |
| parent | fa17ba5de0a003c135150516cd9c80205ac3f9f1 (diff) | |
| download | stonesense-719dbc048a55ba1def2ce21e9cd29e33dbe833ce.tar.gz stonesense-719dbc048a55ba1def2ce21e9cd29e33dbe833ce.tar.bz2 stonesense-719dbc048a55ba1def2ce21e9cd29e33dbe833ce.tar.xz | |
Fix ENUM_KEY_STR breakage.
Diffstat (limited to 'BlockCondition.cpp')
| -rw-r--r-- | BlockCondition.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/BlockCondition.cpp b/BlockCondition.cpp index 022b32b..4d45845 100644 --- a/BlockCondition.cpp +++ b/BlockCondition.cpp @@ -32,14 +32,10 @@ int getDirectionFromString(const char* strDir) int getBuildingFromString(const char* strType)
{
- FOR_ENUM_ITEMS(building_type,i)
- {
- if (strcmp(strType,ENUM_KEY_STR(building_type,i)) == 0)
- {
- return i;
- }
- }
- return INVALID_INDEX;
+ df::building_type item;
+ if (find_enum_item(&item, strType))
+ return (int)item;
+ return INVALID_INDEX;
}
NeighbourWallCondition::NeighbourWallCondition(const char* strDir)
|
