COIN-OR::LEMON - Graph Library

Changeset 1343:20f95cd51aba in lemon for lemon/random.h


Ignore:
Timestamp:
04/28/15 18:13:42 (5 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Parents:
1339:93d455c647be (diff), 1341:c199e9976d93 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merge bugfix #595

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lemon/random.h

    r1338 r1343  
    6363#define LEMON_RANDOM_H
    6464
     65#include <lemon/config.h>
     66
    6567#include <algorithm>
    6668#include <iterator>
     
    7274#include <lemon/dim2.h>
    7375
    74 #ifndef WIN32
     76#ifndef LEMON_WIN32
    7577#include <sys/time.h>
    7678#include <ctime>
     
    606608    /// \return Currently always \c true.
    607609    bool seed() {
    608 #ifndef WIN32
     610#ifndef LEMON_WIN32
    609611      if (seedFromFile("/dev/urandom", 0)) return true;
    610612#endif
     
    626628    /// \param offset The offset, from the file read.
    627629    /// \return \c true when the seeding successes.
    628 #ifndef WIN32
     630#ifndef LEMON_WIN32
    629631    bool seedFromFile(const std::string& file = "/dev/urandom", int offset = 0)
    630632#else
     
    648650    /// \return Currently always \c true.
    649651    bool seedFromTime() {
    650 #ifndef WIN32
     652#ifndef LEMON_WIN32
    651653      timeval tv;
    652654      gettimeofday(&tv, 0);
  • lemon/random.h

    r1340 r1343  
    252252        current = state + length;
    253253
    254         register Word *curr = state + length - 1;
    255         register long num;
     254        Word *curr = state + length - 1;
     255        long num;
    256256
    257257        num = length - shift;
Note: See TracChangeset for help on using the changeset viewer.