[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Improving the performance of annotate
From: |
Nathaniel Smith |
Subject: |
Re: [Monotone-devel] Improving the performance of annotate |
Date: |
Wed, 19 Jul 2006 11:46:35 -0700 |
User-agent: |
Mutt/1.5.11+cvs20060403 |
On Tue, Jul 18, 2006 at 02:43:15PM -0700, Eric Anderson wrote:
> +static void
> +skip_to_next_record(basic_io::input_source &src)
> +{
> + src.col = 1;
> + // records start at two newlines in a row
> + while(LIKELY(src.curr != src.in.end())) {
> + if (*src.curr == '\n') {
> + ++src.line;
> + if ((src.curr+1) != src.in.end() && *(src.curr+1) == '\n') {
> + ++src.curr;
> + ++src.curr;
> + ++src.line;
> + break;
> + }
> + }
> + ++src.curr;
> + }
> +}
What happens in this code if someone has an attr that contains a
double-newline?
-- Nathaniel
--
"But in Middle-earth, the distinct accusative case disappeared from
the speech of the Noldor (such things happen when you are busy
fighting Orcs, Balrogs, and Dragons)."