From b1947bf6e316644b0c2098e9ebb338b85c78bc4b Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Wed, 22 Oct 2025 20:53:15 +0200 Subject: [PATCH] core/job: drop pure qualifier for static inline functions The impl is directly visible to the compiler so it can apply all sorts of optimizations wherever it sees fit. And with the previous commit they are actually "const". --- src/core/job.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/job.h b/src/core/job.h index 028281eb5fc..4c2f78815b0 100644 --- a/src/core/job.h +++ b/src/core/job.h @@ -164,15 +164,15 @@ void job_dependency_free(JobDependency *l); JobType job_type_lookup_merge(JobType a, JobType b) _const_; -_pure_ static inline bool job_type_is_mergeable(JobType a, JobType b) { +static inline bool job_type_is_mergeable(JobType a, JobType b) { return job_type_lookup_merge(a, b) >= 0; } -_pure_ static inline bool job_type_is_conflicting(JobType a, JobType b) { +static inline bool job_type_is_conflicting(JobType a, JobType b) { return a != JOB_NOP && b != JOB_NOP && !job_type_is_mergeable(a, b); } -_pure_ static inline bool job_type_is_superset(JobType a, JobType b) { +static inline bool job_type_is_superset(JobType a, JobType b) { /* Checks whether operation a is a "superset" of b in its actions */ if (b == JOB_NOP) return true; -- 2.47.3