From 7397dc65685ec6d94f6b59f5c63b233586c61c7d Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Sun, 31 Aug 2025 12:58:02 -0700 Subject: [PATCH] fixup! shift much of the internal use of ID* identifier pointers over to IDPtr objects --- src/script_opt/CPP/DeclFunc.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/script_opt/CPP/DeclFunc.cc b/src/script_opt/CPP/DeclFunc.cc index 4307b00fcc..8e79110fbd 100644 --- a/src/script_opt/CPP/DeclFunc.cc +++ b/src/script_opt/CPP/DeclFunc.cc @@ -226,10 +226,10 @@ void CPPCompile::BuildLambda(const FuncTypePtr& ft, const ProfileFunc* pf, const // Frame object. Emit("void SetLambdaCaptures(Frame* f) override"); StartBlock(); - for ( int i = 0; i < nl; ++i ) { + for ( size_t i = 0; i < nl; ++i ) { auto l_i = (*lambda_ids)[i]; const auto& t_i = l_i->GetType(); - auto cap_i = string("f->GetElement(") + Fmt(i) + ")"; + auto cap_i = string("f->GetElement(") + Fmt(static_cast(i)) + ")"; Emit("%s = %s;", lambda_names[l_i], GenericValPtrToGT(cap_i, t_i, GEN_NATIVE)); } EndBlock(); @@ -238,7 +238,7 @@ void CPPCompile::BuildLambda(const FuncTypePtr& ft, const ProfileFunc* pf, const Emit("std::vector SerializeLambdaCaptures() const override"); StartBlock(); Emit("std::vector vals;"); - for ( int i = 0; i < nl; ++i ) { + for ( size_t i = 0; i < nl; ++i ) { auto l_i = (*lambda_ids)[i]; const auto& t_i = l_i->GetType(); Emit("vals.emplace_back(%s);", NativeToGT(lambda_names[l_i], t_i, GEN_VAL_PTR));