On Wed, Feb 19, 2003 at 09:43:09AM +0100, Alfredo Braunstein wrote:
> Right now it's implemented as a queue + a set, so it's O(ln n) for the
> 'first time insert' case, and O(n) for the 'already have it' case.
> I plan to make it O(ln n) always.

Good idea, but we do pretty expensive things in othe places, so I don't
think this hurts.

> I know that the coding style is broken, please correct me without mercy.
> [...] Please be nice.

Hm?


        +class LoaderQueue {
        +public:
        +       LoaderQueue():timer( 100 , Timeout::ONETIME )
        +       {
        +               timer.timeout.connect( boost::bind( &LoaderQueue::loadNext, 
this));
        +               locked = false;
        +               timer.start();
        +       }

LoaderQueue() : timer(100, Timeout::ONETIME), locked(false)
{
        timer.timeout.connect(boost::bind(&LoaderQueue::loadNext, this));
        timer.start();
}

        +       void touch(Cache::ItemPtr item) {
        +
        +               if(locked)

if (locked)
  [etc]

        +               timer.start();
        +       };
        +} LQ;

};

LoaderQueue LQ;



        @@ -266,7 +313,6 @@
                signal_();
         }
         
        -
         void Loader::Impl::createPixmap()

Two empty lines are pretty common in LyX sources.


        iff -u -r1.11 PreviewImage.C
        --- PreviewImage.C      2003/02/13 16:53:00     1.11
        +++ PreviewImage.C      2003/02/19 08:11:58
        @@ -33,7 +33,6 @@
                Image const * image(Inset const &, BufferView const &);
                ///
                void statusChanged();
        -
                ///
                PreviewImage const & parent_;
                ///

As is separating member functions from member variables or blocks of them.

I have not checked for functionality, I cannot connect to cvs right now,
but it does not look bad.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)

Reply via email to