mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
const-ify member function
This commit is contained in:
parent
ffbbacd3b1
commit
735d584d9f
2 changed files with 2 additions and 2 deletions
|
@ -186,7 +186,7 @@ public:
|
||||||
// Returns a mapping of from Attr objects to their associated
|
// Returns a mapping of from Attr objects to their associated
|
||||||
// initialization information. The Attr must have previously
|
// initialization information. The Attr must have previously
|
||||||
// been registered.
|
// been registered.
|
||||||
auto& ProcessedAttr() { return processed_attr; }
|
auto& ProcessedAttr() const { return processed_attr; }
|
||||||
|
|
||||||
// True if the given expression is simple enough that we can
|
// True if the given expression is simple enough that we can
|
||||||
// generate code to evaluate it directly, and don't need to
|
// generate code to evaluate it directly, and don't need to
|
||||||
|
|
|
@ -309,7 +309,7 @@ AttrsInfo::AttrsInfo(CPPCompile* _c, const AttributesPtr& _attrs) : CompoundItem
|
||||||
for ( const auto& a : _attrs->GetAttrs() )
|
for ( const auto& a : _attrs->GetAttrs() )
|
||||||
{
|
{
|
||||||
ASSERT(c->ProcessedAttr().count(a.get()) > 0);
|
ASSERT(c->ProcessedAttr().count(a.get()) > 0);
|
||||||
auto gi = c->ProcessedAttr()[a.get()];
|
const auto& gi = c->ProcessedAttr().at(a.get());
|
||||||
init_cohort = max(init_cohort, gi->InitCohort() + 1);
|
init_cohort = max(init_cohort, gi->InitCohort() + 1);
|
||||||
vals.emplace_back(Fmt(gi->Offset()));
|
vals.emplace_back(Fmt(gi->Offset()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue