message: Extract common subexpression to `productType` variable
diff: @@ -54,7 +54,8 @@ void MapViewState::pullRobotFromFactory(ProductType productType, Factory& factor
  */
  void MapViewState::onFactoryProductionComplete(Factory& factory)
  {
  - switch (factory.productWaiting())
  + const auto productType = factory.productWaiting();
  + switch (productType)
  {
  case ProductType::PRODUCT_DIGGER:
  pullRobotFromFactory(ProductType::PRODUCT_DIGGER, factory);
  @@ -72,8 +73,8 @@ void MapViewState::onFactoryProductionComplete(Factory& factory)
  case ProductType::PRODUCT_CLOTHING:
  case ProductType::PRODUCT_MEDICINE:
  {
  - Warehouse* warehouse = getAvailableWarehouse(factory.productWaiting(), 1);
  - if (warehouse) { warehouse->products().store(factory.productWaiting(), 1); factory.pullProduct(); }
  + Warehouse* warehouse = getAvailableWarehouse(productType, 1);
  + if (warehouse) { warehouse->products().store(productType, 1); factory.pullProduct(); }
  else { factory.idle(IdleReason::FactoryInsufficientWarehouseSpace); }
  break;
  }
  