What is the purpose of the sef- and mutual- recursion between
GuiView::saveBuffer() and GuiView::renameBuffer() methods ?
I was wondering if it were possible to get rid of such recursion
at all, possibly by factoring the functionality into multiple
methods.

(actually, when focus is on searchArea in lyx-advsearch branch
and you try to exit LyX, the program hangs appearently here)

bool GuiView::saveBuffer(Buffer & b)
{
...
   if (b.isUnnamed())
       return renameBuffer(b, docstring());
...
   switch (ret) {
   case 0:
       if (!renameBuffer(b, docstring()))
           return false;
...
   return saveBuffer(b);
}

bool GuiView::renameBuffer(Buffer & b, docstring const & newname)
{
...
       switch (ret) {
       case 0: break;
       case 1: return renameBuffer(b, docstring());
...
   if (!saveBuffer(b)) {
...
   return true;
}

Thanks, bye,

   T.

--
Tommaso Cucinotta, Computer Engineering PhD, Researcher
ReTiS Lab, Scuola Superiore Sant'Anna, Pisa, Italy
Tel +39 050 882 024, Fax +39 050 882 003
http://feanor.sssup.it/~tommaso

Reply via email to