OutpostUniverse / OPHD

OutpostHD - Open source remake of Sierra On-Line's Outpost
BSD 3-Clause "New" or "Revised" License
109 stars 20 forks source link

Fix windows warning C26478 - Don't use `std::move` on constant variables #1436

Closed DanRStevens closed 9 months ago

DanRStevens commented 9 months ago

Use a reference to work around buggy MSVC warning:

OPHD\libControls\ScrollBar.cpp(250): error C26478: Don't use std::move on constant variables.

Example problem run: https://github.com/OutpostUniverse/OPHD/actions/runs/7684040546


The original code perhaps makes slightly more sense, but has been generating a warning with recent MSVC compiler releases. A fix has supposedly been released, but doesn't seem to be present on GitHub Action runners.

References:


Related to Issue #307