← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/fix_ware_amount into lp:widelands

 

Review: Approve



Diff comments:

> === modified file 'src/logic/map_objects/tribes/bill_of_materials.h'
> --- src/logic/map_objects/tribes/bill_of_materials.h	2015-12-11 19:06:50 +0000
> +++ src/logic/map_objects/tribes/bill_of_materials.h	2016-02-04 17:53:17 +0000
> @@ -25,7 +25,7 @@
>  #include "logic/widelands.h"
>  
>  namespace Widelands {
> -using WareAmount = std::pair<DescriptionIndex, uint8_t>;
> +using WareAmount = std::pair<DescriptionIndex, uint32_t>;

just make it an int? overflow errors are not as bad as sign conversion errors.

>  using BillOfMaterials = std::vector<WareAmount>;
>  
>  // range structure for iterating ware range with index


-- 
https://code.launchpad.net/~widelands-dev/widelands/fix_ware_amount/+merge/285099
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/fix_ware_amount.


References