mirror of
https://github.com/verilator/verilator.git
synced 2026-08-31 10:04:40 +02:00
Internals: More const. No functional change intended.
This commit is contained in:
@@ -153,7 +153,7 @@ int V3OptionParser::parse(int idx, int argc, char* argv[]) {
|
||||
UASSERT(m_pimpl->m_isFinalized, "finalize() must be called before parse()");
|
||||
const char* optp = argv[idx];
|
||||
if (optp[0] == '-' && optp[1] == '-') ++optp;
|
||||
ActionIfs* actp = find(optp);
|
||||
ActionIfs* const actp = find(optp);
|
||||
if (!actp) return 0;
|
||||
if (!actp->isValueNeeded()) {
|
||||
actp->exec(optp, nullptr);
|
||||
@@ -224,7 +224,7 @@ V3OptionParser::ActionIfs&
|
||||
V3OptionParser::AppendHelper::operator()(const char* optp, CbPartialMatchVal,
|
||||
Impl::ActionCbPartialMatchVal::CbType cb) const {
|
||||
const size_t prefixLen = std::strlen(optp);
|
||||
auto wrap
|
||||
const auto wrap
|
||||
= [prefixLen, cb](const char* optp, const char* argp) { cb(optp + prefixLen, argp); };
|
||||
return m_parser.add<Impl::ActionCbPartialMatchVal>(optp, std::move(wrap));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user