Fixed compilation for Clang.

This commit is contained in:
Nyfor 2016-04-04 12:07:09 +02:00
parent d696f72533
commit 5e94c772b3
6 changed files with 19 additions and 40 deletions

View file

@ -259,7 +259,7 @@ void GraphWidget::keyPressEvent(QKeyEvent *event)
}
}
static void convolveWithGaussian(double *forceMap,int S,int /*s*/)
static void convolveWithGaussian(double *forceMap,unsigned int S,int /*s*/)
{
static double *bf = NULL ;
@ -267,8 +267,8 @@ static void convolveWithGaussian(double *forceMap,int S,int /*s*/)
{
bf = new double[S*S*2] ;
for(int i=0;i<S;++i)
for(int j=0;j<S;++j)
for(unsigned int i=0;i<S;++i)
for(unsigned int j=0;j<S;++j)
{
int x = (i<S/2)?i:(S-i) ;
int y = (j<S/2)?j:(S-j) ;
@ -284,8 +284,8 @@ static void convolveWithGaussian(double *forceMap,int S,int /*s*/)
unsigned long nn[2] = {S,S};
fourn(&forceMap[-1],&nn[-1],2,1) ;
for(int i=0;i<S;++i)
for(int j=0;j<S;++j)
for(unsigned int i=0;i<S;++i)
for(unsigned int j=0;j<S;++j)
{
float a = forceMap[2*(i+S*j)]*bf[2*(i+S*j)] - forceMap[2*(i+S*j)+1]*bf[2*(i+S*j)+1] ;
float b = forceMap[2*(i+S*j)]*bf[2*(i+S*j)+1] + forceMap[2*(i+S*j)+1]*bf[2*(i+S*j)] ;
@ -296,7 +296,7 @@ static void convolveWithGaussian(double *forceMap,int S,int /*s*/)
fourn(&forceMap[-1],&nn[-1],2,-1) ;
for(int i=0;i<S*S*2;++i)
for(unsigned int i=0;i<S*S*2;++i)
forceMap[i] /= S*S;
}

View file

@ -362,21 +362,21 @@ Rshare::showUsageMessageBox()
out << "<table>";
//out << trow(tcol("-"ARG_HELP) +
// tcol(tr("Displays this usage message and exits.")));
out << trow(tcol("-"ARG_RESET) +
out << trow(tcol("-" ARG_RESET) +
tcol(tr("Resets ALL stored RetroShare settings.")));
out << trow(tcol("-"ARG_DATADIR" &lt;dir&gt;") +
out << trow(tcol("-" ARG_DATADIR" &lt;dir&gt;") +
tcol(tr("Sets the directory RetroShare uses for data files.")));
out << trow(tcol("-"ARG_LOGFILE" &lt;file&gt;") +
out << trow(tcol("-" ARG_LOGFILE" &lt;file&gt;") +
tcol(tr("Sets the name and location of RetroShare's logfile.")));
out << trow(tcol("-"ARG_LOGLEVEL" &lt;level&gt;") +
out << trow(tcol("-" ARG_LOGLEVEL" &lt;level&gt;") +
tcol(tr("Sets the verbosity of RetroShare's logging.") +
"<br>[" + Log::logLevels().join("|") +"]"));
out << trow(tcol("-"ARG_GUISTYLE" &lt;style&gt;") +
out << trow(tcol("-" ARG_GUISTYLE" &lt;style&gt;") +
tcol(tr("Sets RetroShare's interface style.") +
"<br>[" + QStyleFactory::keys().join("|") + "]"));
out << trow(tcol("-"ARG_GUISTYLESHEET" &lt;stylesheet&gt;") +
out << trow(tcol("-" ARG_GUISTYLESHEET" &lt;stylesheet&gt;") +
tcol(tr("Sets RetroShare's interface stylesheets.")));
out << trow(tcol("-"ARG_LANGUAGE" &lt;language&gt;") +
out << trow(tcol("-" ARG_LANGUAGE" &lt;language&gt;") +
tcol(tr("Sets RetroShare's language.") +
"<br>[" + LanguageSupport::languageCodes().join("|") + "]"));
out << "</table>";