From 5e64a81043b8e503be840af50b49ac8c87300a84 Mon Sep 17 00:00:00 2001 From: Angelo Matni Date: Tue, 23 Dec 2025 11:05:08 -0800 Subject: [PATCH] Changed SchedulingOptions helper to reference Package as const since it does not modify it. PiperOrigin-RevId: 848236315 --- xls/scheduling/scheduling_options.cc | 4 ++-- xls/scheduling/scheduling_options.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xls/scheduling/scheduling_options.cc b/xls/scheduling/scheduling_options.cc index 4d04f37c28..479d99133b 100644 --- a/xls/scheduling/scheduling_options.cc +++ b/xls/scheduling/scheduling_options.cc @@ -39,7 +39,7 @@ namespace xls { namespace { absl::StatusOr OptionsFromFlagProto( - Package* p, const SchedulingOptionsFlagsProto& proto) { + const Package* p, const SchedulingOptionsFlagsProto& proto) { // Some fields are pre-initialized with defaults SchedulingOptions scheduling_options; @@ -297,7 +297,7 @@ absl::StatusOr IsDelayModelSpecifiedViaFlag( } absl::StatusOr SetUpSchedulingOptions( - const SchedulingOptionsFlagsProto& flags, Package* p) { + const SchedulingOptionsFlagsProto& flags, const Package* p) { return OptionsFromFlagProto(p, flags); } diff --git a/xls/scheduling/scheduling_options.h b/xls/scheduling/scheduling_options.h index b6e431db3e..3a6afd186b 100644 --- a/xls/scheduling/scheduling_options.h +++ b/xls/scheduling/scheduling_options.h @@ -636,7 +636,7 @@ class SchedulingOptions { using ScheduleCycleMap = absl::flat_hash_map; absl::StatusOr SetUpSchedulingOptions( - const SchedulingOptionsFlagsProto& flags, Package* p); + const SchedulingOptionsFlagsProto& flags, const Package* p); absl::StatusOr SetUpDelayEstimator( const SchedulingOptionsFlagsProto& flags);