Commit 48e8de9d authored by Yuri Chornoivan's avatar Yuri Chornoivan
Browse files

Fix minor EBN and GCC issues

Summary:
Fix some minor issues from EBN

http://ebn.kde.org/krazy/reports/kde-4.x/kdeedu/analitza/index.html

and GCC logs

https://build.kde.org/job/Applications/job/analitza/job/kf5-qt5%20SUSEQt5.12/13/warnings30Result/

Test Plan: Compiles.

Reviewers: #kde_edu, apol

Reviewed By: apol

Subscribers: apol, kde-edu

Tags: #kde_edu

Differential Revision: https://phabricator.kde.org/D25787
parent a849ac70
......@@ -21,8 +21,8 @@
//NOTE this code generates the whole thing ...
// see seq function in
// http://rosettacode.org/wiki/Addition-chain_exponentiation/Achain.c or
// http://www-cs-faculty.stanford.edu/~knuth/programs/achain4.w
// https://rosettacode.org/wiki/Addition-chain_exponentiation/Achain.c or
// https://www-cs-faculty.stanford.edu/~knuth/programs/achain4.w
// int main(int argc, char *argv[])
// {
// const int MAX_N = 2048;
......
......@@ -640,7 +640,7 @@ QString generateDependencyGraph(const Variables* v)
foreach(const QString& d, deps) {
const Object* o=v->value(d);
if(o && isLambda(o)) {
ret += "\t"+current+" -> "+d+";\n";
ret += '\t'+current+" -> "+d+";\n";
}
}
}
......
......@@ -154,7 +154,7 @@ QVariant HtmlExpressionWriter::visit ( const Analitza::Apply* a )
foreach(Object* o, a->m_params) {
Object::ObjectType type=o->type();
switch(type) {
if(type == Object::oper)
case Object::oper:
Q_ASSERT(false);
break;
case Object::variable:
......
......@@ -35,7 +35,7 @@ namespace Analitza
class MathMLExpressionWriter : public AbstractExpressionVisitor
{
public:
MathMLExpressionWriter(const Object* o);
explicit MathMLExpressionWriter(const Object* o);
virtual QVariant visit(const None* var) override;
virtual QVariant visit(const Ci* var) override;
......
......@@ -415,7 +415,7 @@ Cn* reduceUnaryReal(Operator::OperatorType op, Cn* oper, QString** correct)
case Operator::arccot:
oper->setValue(log(a+pow(a*a+1., 0.5)));
break;
case Operator::arcsinh: //see http://en.wikipedia.org/wiki/Inverse_hyperbolic_function
case Operator::arcsinh: //see https://en.wikipedia.org/wiki/Inverse_hyperbolic_function
oper->setValue(asinh(a));
break;
case Operator::arccosh:
......@@ -835,7 +835,7 @@ Object* Operations::reduceMatrixValue(Operator::OperatorType op, Matrix* matrix,
if (exp>1)
products[1] = static_cast<Matrix*>(reduceMatrixMatrix(Operator::times, matrix, matrix, correct));
//NOTE see http://rosettacode.org/wiki/Addition-chain_exponentiation#C for more details
//NOTE see https://rosettacode.org/wiki/Addition-chain_exponentiation#C for more details
for (i = 2; i <= len; ++i)
for (j = i - 1; j; --j)
for (k = j; k >= 0; --k)
......
/*************************************************************************************
* Copyright (C) 2019 Aleix Pol Gonzalez <aleixpol@kde.org> *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
*************************************************************************************/
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
......
......@@ -165,7 +165,7 @@ bool PlotsModel::setData(const QModelIndex& index, const QVariant& value, int ro
}
return false;
}
}
} //fallthrough
case Qt::CheckStateRole:
m_items[index.row()]->setVisible(value.toBool());
return true;
......@@ -252,7 +252,7 @@ QModelIndex PlotsModel::indexForName(const QString& name)
QString PlotsModel::freeId() const
{
return "f"+QString::number(m_namingCount);
return 'f'+QString::number(m_namingCount);
}
void PlotsModel::setResolution(int res)
......
......@@ -85,8 +85,8 @@ bool FunctionGraphFactory::registerFunctionGraph(Dimension dim, PlotItemConstuct
std::sort(arguments.begin(), arguments.end());
//TODO: turn this id into an internal struct
QString id = QString::number((int)dim)+"|"+
QString::number((int)coordinateSystemFunction)+"|"+
QString id = QString::number((int)dim)+'|'+
QString::number((int)coordinateSystemFunction)+'|'+
arguments.join(QStringLiteral(","));
Q_ASSERT(!contains(id)); // verificar que no se registren los mismos tipos
......
......@@ -15,7 +15,7 @@
//
// You should have received a copy of the GNU General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
/** \file
\brief MarchingCubes Algorithm
......
/*************************************************************************************
* Copyright (C) 2013-2017 by Aleix Pol <aleixpol@kde.org> *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
*************************************************************************************/
import QtQuick 2.0
import org.kde.analitza 1.0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment