[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesupport/strigi/src/streamanalyzer
From: Christian Ehrlicher <Ch.Ehrlicher () gmx ! de>
Date: 2009-04-13 14:48:20
Message-ID: 1239634100.992081.22025.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 953270 by chehrlic:
random() is not available on all platforms - use rand() for now - or is there a better way?
CCMAIL: phreedom.stdin@gmail.com
M +3 -1 analysisresult.cpp
--- trunk/kdesupport/strigi/src/streamanalyzer/analysisresult.cpp #953269:953270
@@ -30,6 +30,7 @@
#include "streambase.h"
#include "textutils.h"
#include "strigi_thread.h"
+#include <time.h>
#include <string>
#include <cstdlib>
#include <iconv.h>
@@ -138,6 +139,7 @@
time_t mt, AnalysisResult& parent)
:p(new Private(path, name, mt, *this, parent)) {
p->m_writer.startAnalysis(this);
+ srand(time(NULL));
}
AnalysisResult::Private::Private(const std::string& p, time_t mt,
IndexWriter& w, StreamAnalyzer& indexer, const string& parentpath,
@@ -370,7 +372,7 @@
result.resize(6);
result[0]=':';
for(int i=1; i<6; i++)
- result[i]=(char)((random() % 26) + 'a');
+ result[i]=(char)((rand() % 26) + 'a');
return result;
}
bool
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic