From 15919532c723ca0186b0c0c932cd1b90c7d2e570 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 28 Apr 2017 20:06:43 +0300 Subject: Fix code style. --- src/resources/item/itemoption.h | 4 +++- src/resources/item/itemoptionslist.h | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/resources') 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; -- cgit v1.2.3-70-g09d2