From 361285add978c5720bc16344a9fe41fa93374505 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 4 Jan 2020 03:09:56 -0500 Subject: time: Remove overflow error checking (currently breaks ADO builds). --- src/core/hle/service/time/clock_types.h | 10 +--------- src/core/hle/service/time/time_zone_manager.cpp | 10 +--------- 2 files changed, 2 insertions(+), 18 deletions(-) (limited to 'src/core') diff --git a/src/core/hle/service/time/clock_types.h b/src/core/hle/service/time/clock_types.h index 3d5b0ff1e..72e1921ec 100644 --- a/src/core/hle/service/time/clock_types.h +++ b/src/core/hle/service/time/clock_types.h @@ -4,8 +4,6 @@ #pragma once -#include - #include "common/common_funcs.h" #include "common/common_types.h" #include "common/uuid.h" @@ -26,13 +24,7 @@ struct SteadyClockTimePoint { return ERROR_TIME_MISMATCH; } - const boost::safe_numerics::safe this_time_point{time_point}; - const boost::safe_numerics::safe other_time_point{other.time_point}; - try { - span = other_time_point - this_time_point; - } catch (const std::exception&) { - return ERROR_OVERFLOW; - } + span = other.time_point - time_point; return RESULT_SUCCESS; } diff --git a/src/core/hle/service/time/time_zone_manager.cpp b/src/core/hle/service/time/time_zone_manager.cpp index c06ca538a..4db6d7ad3 100644 --- a/src/core/hle/service/time/time_zone_manager.cpp +++ b/src/core/hle/service/time/time_zone_manager.cpp @@ -4,8 +4,6 @@ #include -#include - #include "common/assert.h" #include "common/logging/log.h" #include "core/file_sys/content_archive.h" @@ -77,13 +75,7 @@ struct CalendarTimeInternal { template static bool SafeAdd(TResult& result, TOperand op) { - const boost::safe_numerics::safe safe_result{result}; - const boost::safe_numerics::safe safe_op{op}; - try { - result = safe_result + safe_op; - } catch (const std::exception&) { - return {}; // Failed with undefined behavior - } + result = result + op; return true; } -- cgit v1.2.3