[patch] logger::delete_saved_messages

Dave Brolley <[email protected]>
Newsgroups gmane.comp.emulators.sid.devel
Organization Red Hat Canada, Ltd
Message-ID <[email protected]>
This corrects the clearing of saved_messages and saved_levels. The 
previous code was just plain incorrect and caused memory access problems 
on some platforms.

Dave
logger.ChangeLog (text/plain, 111 B)
2003-12-17  Dave Brolley  <[email protected]>

	* sidmiscutil.h (delete_saved_messages): Use 'clear' method.
logger.patch.txt (text/plain, 1.1 KB)
Index: sid/include/sidmiscutil.h
===================================================================
RCS file: /cvs/src/src/sid/include/sidmiscutil.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -c -p -r1.7 -r1.8
*** sid/include/sidmiscutil.h	21 Oct 2003 21:38:24 -0000	1.7
--- sid/include/sidmiscutil.h	17 Dec 2003 19:51:02 -0000	1.8
***************
*** 1,6 ****
  // sidmiscutil.h - Useful utility classes.  -*- C++ -*-
  
! // Copyright (C) 1999-2002 Red Hat.
  // This file is part of SID and is licensed under the GPL.
  // See the file COPYING.SID for conditions for redistribution.
  
--- 1,6 ----
  // sidmiscutil.h - Useful utility classes.  -*- C++ -*-
  
! // Copyright (C) 1999-2003 Red Hat.
  // This file is part of SID and is licensed under the GPL.
  // See the file COPYING.SID for conditions for redistribution.
  
*************** namespace sidutil
*** 526,532 ****
    public:
      void delete_saved_messages ()
      {
!       saved_messages.erase (saved_messages.end ());
      }
    };
  
--- 526,533 ----
    public:
      void delete_saved_messages ()
      {
!       saved_messages.clear ();
!       saved_levels.clear ();
      }
    };
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.