BIND 10 #2374: MasterLexer's Number state classes
BIND 10 Development
do-not-reply at isc.org
Wed Nov 28 17:23:35 UTC 2012
#2374: MasterLexer's Number state classes
-------------------------------------+-------------------------------------
Reporter: | Owner: UnAssigned
jinmei | Status: reviewing
Type: task | Milestone:
Priority: | Sprint-20121204
medium | Resolution:
Component: | Sensitive: 0
libdns++ | Sub-Project: DNS
Keywords: | Estimated Difficulty: 4
Defect Severity: N/A | Total Hours: 0
Feature Depending on Ticket: |
loadzone-ng |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by jinmei):
Replying to [comment:14 jelte]:
> code change itself is small, diff slightly larger because each
state::start() call needs the option.
>
> Anyway, merged master back into branch trac2374, and added this (last
commit)
The changes look okay, with one suggestion: maybe it's slightly better
to test the option first:
{{{#!cpp
} else if (isdigit(c) && (options & MasterLexer::NUMBER) != 0) {
}}}
Normally the NUMBER option wouldn't be specified, so we can skip the
call to isdigit() in most cases.
Oh, and I just noticed one minor thing. The line containing
lexical_cast is a bit too long:
{{{#!cpp
const uint32_t number32 =
boost::lexical_cast<uint32_t, const
char*>(&data.at(0));
token = MasterLexer::Token(number32);
}}}
With fixing these (if you agree), please remerge.
--
Ticket URL: <http://bind10.isc.org/ticket/2374#comment:16>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list