diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-04-28 20:06:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-04-28 23:02:16 +0300 |
commit | 15919532c723ca0186b0c0c932cd1b90c7d2e570 (patch) | |
tree | 249673c7f5f06b2741826e12d7f69a9de379a52d /src/resources/item | |
parent | 515323530ba1b93c8d5ba00b015bf55aa0ecb01c (diff) | |
download | ManaVerse-15919532c723ca0186b0c0c932cd1b90c7d2e570.tar.gz ManaVerse-15919532c723ca0186b0c0c932cd1b90c7d2e570.tar.bz2 ManaVerse-15919532c723ca0186b0c0c932cd1b90c7d2e570.tar.xz ManaVerse-15919532c723ca0186b0c0c932cd1b90c7d2e570.zip |
Fix code style.
Diffstat (limited to 'src/resources/item')
-rw-r--r-- | src/resources/item/itemoption.h | 4 | ||||
-rw-r--r-- | src/resources/item/itemoptionslist.h | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/resources/item/itemoption.h b/src/resources/item/itemoption.h index 5d993c8d6..c4327622a 100644 --- a/src/resources/item/itemoption.h +++ b/src/resources/item/itemoption.h @@ -25,7 +25,9 @@ struct ItemOption final { - ItemOption() + ItemOption() : + index(0U), + value(0) { } A_DELETE_COPY(ItemOption) diff --git a/src/resources/item/itemoptionslist.h b/src/resources/item/itemoptionslist.h index 7bb259028..725340f45 100644 --- a/src/resources/item/itemoptionslist.h +++ b/src/resources/item/itemoptionslist.h @@ -31,7 +31,8 @@ struct ItemOptionsList final { - explicit ItemOptionsList(const int amount0) : + explicit ItemOptionsList(const size_t amount0) : + options(nullptr), amount(amount0), pointer(0U) { @@ -39,6 +40,7 @@ struct ItemOptionsList final } ItemOptionsList() : + options(nullptr), amount(maxItemOptions), pointer(0U) { @@ -68,9 +70,9 @@ struct ItemOptionsList final if (options0 == nullptr) return nullptr; - const int amount0 = options0->amount; + const size_t amount0 = options0->amount; ItemOptionsList *const obj = new ItemOptionsList(amount0); - for (int f = 0; f < amount0; f ++) + for (size_t f = 0; f < amount0; f ++) { obj->options[f].index = options0->options[f].index; obj->options[f].value = options0->options[f].value; |