/[enigma]/enigma/src/d_models.cc
ViewVC logotype

Diff of /enigma/src/d_models.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by dheck, Sun Jun 15 10:28:34 2003 UTC revision 1.10 by dheck, Thu Jun 26 17:16:45 2003 UTC
# Line 26  Line 26 
26  #include "px/cache.hh"  #include "px/cache.hh"
27  #include "display.hh"  #include "display.hh"
28  #include "d_engine.hh"  #include "d_engine.hh"
29    #include "enigma.hh"
30  #include <cstdio>  #include <cstdio>
31  #include <string>  #include <string>
32  #include <list>  #include <list>
# Line 340  Model * Line 341  Model *
341  RandomModel::clone()  RandomModel::clone()
342  {  {
343      if (!modelnames.empty()) {      if (!modelnames.empty()) {
344          int r = int(modelnames.size() * (rand()/(RAND_MAX+1.0)));          int r = enigma::IntegerRand(0, modelnames.size()-1);
345          return MakeModel(modelnames[r]);          return MakeModel(modelnames[r]);
346      } else {      } else {
347          fprintf(stderr, "display_2d.cc: empty RandomModel\n");          fprintf(stderr, "display_2d.cc: empty RandomModel\n");

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26