1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

- WeightedRule optimization - part 1

- comments, style
This commit is contained in:
DjWarmonger
2016-08-11 07:49:08 +02:00
parent 25fd4d85e2
commit 2410f0af61
4 changed files with 15 additions and 18 deletions

View File

@@ -229,7 +229,7 @@ struct DLL_LINKAGE TerrainViewPattern
{
struct WeightedRule
{
WeightedRule();
WeightedRule(std::string &Name);
/// Gets true if this rule is a standard rule which means that it has a value of one of the RULE_* constants.
bool isStandardRule() const;
@@ -237,6 +237,11 @@ struct DLL_LINKAGE TerrainViewPattern
std::string name;
/// Optional. A rule can have points. Patterns may have a minimum count of points to reach to be successful.
int points;
private:
bool standardRule;
WeightedRule(); //only allow string constructor
};
static const int PATTERN_DATA_SIZE = 9;