From d3ebec388eae1f7a8e700b436a95b663e5c69171 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Mon, 12 Oct 2009 11:29:05 -0700 Subject: [PATCH] MonMap: Remove pick_mon() and last_mon data member -- doesn't belong here --- src/mon/MonMap.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/mon/MonMap.h b/src/mon/MonMap.h index 185cb2a5d863e..8125a848fdc4f 100644 --- a/src/mon/MonMap.h +++ b/src/mon/MonMap.h @@ -29,9 +29,7 @@ class MonMap { utime_t last_changed; utime_t created; - int last_mon; // last mon i talked to - - MonMap() : epoch(0), last_mon(-1) { + MonMap() : epoch(0) { memset(&fsid, 0, sizeof(fsid)); last_changed = created = g_clock.now(); } @@ -72,15 +70,6 @@ class MonMap { return false; } - // pick a mon. - // choice should be stable, unless we explicitly ask for a new one. - int pick_mon(bool newmon=false) { - if (newmon || (last_mon < 0)) { - last_mon = rand() % mon_inst.size(); - } - return last_mon; - } - const entity_inst_t &get_inst(unsigned m) { assert(m < mon_inst.size()); return mon_inst[m]; -- 2.39.5