Use std::tie to unpack bounds

Co-authored-by: Celtic Minstrel <CelticMinstrel@users.noreply.github.com>
This commit is contained in:
2025-03-18 20:08:38 -05:00
parent 01ad3c5622
commit 8ea34d434d

View File

@@ -9,13 +9,14 @@
#include "living.hpp"
#include <algorithm>
#include <tuple>
#include "mathutil.hpp"
void iLiving::apply_status(eStatus which, int how_much) {
if(!is_alive()) return;
std::pair<int, int> bounds = status_bounds(which);
int lo = bounds.first, hi = bounds.second;
int lo, hi;
std::tie(lo, hi) = status_bounds(which);
if(which == eStatus::ASLEEP || which == eStatus::DUMB) {
// No "wrapping" allowed for these effects.