diff src/debug.h @ 9183:94ae487acd1b

use set instead of map to keep track of debugger breakpoints
author jpswensen@compsci34-754-2010.compscidhcp.jhu.edu
date Tue, 05 May 2009 15:10:25 -0400
parents eb63fbe60fab
children 3c1762c7e787
line wrap: on
line diff
--- a/src/debug.h	Tue May 05 14:11:43 2009 -0400
+++ b/src/debug.h	Tue May 05 15:10:25 2009 -0400
@@ -24,6 +24,7 @@
 #define octave_debug_h 1
 
 #include <map>
+#include <set>
 #include "ov.h"
 #include "dRowVector.h"
 
@@ -116,14 +117,11 @@
 
 private:
 
-  // Map from function names to function objects for functions
-  // containing at least one breakpoint.
-  typedef std::map<std::string, octave_user_code *> breakpoint_map;
+  typedef std::set<std::string>::const_iterator const_bp_set_iterator;
+  typedef std::set<std::string>::iterator bp_set_iterator;
 
-  typedef breakpoint_map::const_iterator const_breakpoint_map_iterator;
-  typedef breakpoint_map::iterator breakpoint_map_iterator;
-
-  breakpoint_map bp_map;
+  // Set of function names containing at least one breakpoint.
+  std::set<std::string> bp_set;
 
   static bp_table *instance;
 
@@ -138,7 +136,7 @@
 
   fname_line_map do_get_breakpoint_list (const octave_value_list& fname_list);
 
-  bool do_have_breakpoints (void) { return (! bp_map.empty ()); }
+  bool do_have_breakpoints (void) { return (! bp_set.empty ()); }
 };
 
 std::string get_file_line (const std::string& fname, size_t line);