Re: Potential bug

2011-03-09 Thread Julien Rioux
On 09/03/2011 4:31 AM, Mark Dickinson wrote: Hi, Not sure if you can help. I'm a complete LaTeX novice, but need to produce some exam scripts using a .sty produced by our hardcore LaTeX users (as usual there are two camps - the LaTeX users and the MS Word users!). I don't have tome to learn

Re: Question about potential bug in LyXFunc

2006-09-10 Thread Lars Gullik Bjønnes
Abdelrazak Younes <[EMAIL PROTECTED]> writes: | While re-compiling LyX, I noticed the following warning: | | ..\..\..\src\lyxfunc.C(218) : warning C4244: 'initializing' : | conversion from 'lyx::char_type' to 'char', possible loss of data | | in | | void LyXFunc::handleKeyFunc(kb_action actio

Question about potential bug in LyXFunc

2006-09-10 Thread Abdelrazak Younes
While re-compiling LyX, I noticed the following warning: ..\..\..\src\lyxfunc.C(218) : warning C4244: 'initializing' : conversion from 'lyx::char_type' to 'char', possible loss of data in void LyXFunc::handleKeyFunc(kb_action action) { char c = encoded_last_key; The problem is tha

Re: Potential bug?

2003-09-15 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Jean-Marc, would you accept a patch porting this to the 1.3.x Angus> branch too? It enables us to clean up after finished conversion Angus> processes. Yes. Actually, I planned to ask after finishing reading the thread... JMarc

Re: Potential bug?

2003-09-14 Thread Angus Leeming
Alfredo Braunstein wrote: > What about (almost the same as the original one) > > while (ipit != ipend) { > InProgressProcesses::iterator curr = ipit++; > if (curr->second.snippets.empty()) > in_progress_.erase(curr); > } > >

Re: Potential bug?

2003-09-14 Thread Alfredo Braunstein
Angus Leeming wrote: > if (ipit == ipend) > return; > InProgressProcesses::iterator next = boost::next(ipit); > while (ipit != ipend) { > if (ipit->second.snippets.empty()) { > in_progress_.erase(ipit); >

Re: Potential bug?

2003-09-14 Thread Angus Leeming
Michael Schmitt wrote: > Hi, > > I was looking for a small code snippet that tells me how to use > iterators in combination with erase (the latter makes the iterator invalid). > > When browsing through the LyX sources, I came across the following code: > > void PreviewLoader::Impl::remove(s

Re: Potential bug?

2003-09-11 Thread Andre Poenitz
On Thu, Sep 11, 2003 at 01:17:12PM +0200, Michael Schmitt wrote: > Hi, > > I was looking for a small code snippet that tells me how to use > iterators in combination with erase (the latter makes the iterator invalid). > > When browsing through the LyX sources, I came across the following code: >

Potential bug?

2003-09-11 Thread Michael Schmitt
Hi, I was looking for a small code snippet that tells me how to use iterators in combination with erase (the latter makes the iterator invalid). When browsing through the LyX sources, I came across the following code: void PreviewLoader::Impl::remove(string const & latex_snippet) {

Re: potential bug?

2002-01-14 Thread Dekel Tsur
On Mon, Jan 14, 2002 at 12:46:10PM +, Angus Leeming wrote: > This is what I've done: > > int const nlines = int(lyx::count(preamble.begin(), preamble.end(), '\n')); > for (int j = 0; j != nlines; ++j) { > texrow.newline(); > } or TYPE const nlines = lyx

Re: potential bug?

2002-01-14 Thread Angus Leeming
On Monday 14 January 2002 12:27 pm, you wrote: > | Well, there is no reason to count down other than to obfuscate: > | for (int j = countChar(preamble, '\n'); j-- ;) { > | texrow.newline(); > | } > > > | I'll change it to: > | for (int j = 0; > | j != lyx::count(

Re: potential bug?

2002-01-14 Thread Andre Poenitz
On Mon, Jan 14, 2002 at 12:52:10PM +0100, Lars Gullik Bjønnes wrote: > | They should be identical (except for the actual value of j in the body). > | However I'd prefer "counting up" on non-critical paths > > Also counting up is a bit easier to read, That's the reason for my preference. > b

Re: potential bug?

2002-01-14 Thread Angus Leeming
On Monday 14 January 2002 11:52 am, Lars Gullik Bjønnes wrote: > Andre Poenitz <[EMAIL PROTECTED]> writes: > > | On Mon, Jan 14, 2002 at 10:35:48AM +, Angus Leeming wrote: > >> Whilst replacing countChar with lyx::count, I came across this line whose > >> semantics I do not understand. > >>

Re: potential bug?

2002-01-14 Thread Andre Poenitz
On Mon, Jan 14, 2002 at 10:35:48AM +, Angus Leeming wrote: > Whilst replacing countChar with lyx::count, I came across this line whose > semantics I do not understand. > > src/buffer.C:2452: > for (int j = countChar(preamble, '\n'); j-- ;) { 'If j != 0 decrement it and h

potential bug?

2002-01-14 Thread Angus Leeming
Whilst replacing countChar with lyx::count, I came across this line whose semantics I do not understand. src/buffer.C:2452: for (int j = countChar(preamble, '\n'); j-- ;) { shouldn't this be for (int j = countChar(preamble, '\n'); j >= 0; --j) { Alternatively, ca