fix readability-*:
* readability-uppercase-literal-suffix * readability-named-parameter
This commit is contained in:
@@ -47,7 +47,7 @@ std::string AxisPy::representation() const
|
||||
return str.str();
|
||||
}
|
||||
|
||||
PyObject* AxisPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper
|
||||
PyObject* AxisPy::PyMake(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/)
|
||||
{
|
||||
// create a new instance of AxisPy and the Twin object
|
||||
return new AxisPy(new Axis);
|
||||
|
||||
@@ -106,11 +106,8 @@ void BaseClass::initSubclass(Base::Type& toInit,
|
||||
*/
|
||||
PyObject* BaseClass::getPyObject()
|
||||
{
|
||||
assert(0);
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
void BaseClass::setPyObject(PyObject*)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
void BaseClass::setPyObject(PyObject* /*unused*/)
|
||||
{}
|
||||
|
||||
@@ -45,7 +45,7 @@ std::string BoundBoxPy::representation() const
|
||||
return str.str();
|
||||
}
|
||||
|
||||
PyObject* BoundBoxPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper
|
||||
PyObject* BoundBoxPy::PyMake(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/)
|
||||
{
|
||||
// create a new instance of BoundBoxPy and the Twin object
|
||||
return new BoundBoxPy(new BoundBox3d);
|
||||
|
||||
@@ -456,9 +456,9 @@ void ArrowItem::write(InventorOutput& out) const
|
||||
dir.Scale(sf2, sf2, sf2);
|
||||
Vector3f cpt = line.p1 + dir;
|
||||
|
||||
Vector3f rot = Vector3f(0.0f, 1.0f, 0.0f) % dir;
|
||||
Vector3f rot = Vector3f(0.0F, 1.0F, 0.0F) % dir;
|
||||
rot.Normalize();
|
||||
float angle = Vector3f(0.0f, 1.0f, 0.0f).GetAngle(dir);
|
||||
float angle = Vector3f(0.0F, 1.0F, 0.0F).GetAngle(dir);
|
||||
|
||||
out.write() << "Separator {\n";
|
||||
out.write() << " Material { diffuseColor " << rgb.red() << " " << rgb.green() << " "
|
||||
|
||||
@@ -38,7 +38,8 @@ std::string CoordinateSystemPy::representation() const
|
||||
return {"<CoordinateSystem object>"};
|
||||
}
|
||||
|
||||
PyObject* CoordinateSystemPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper
|
||||
PyObject*
|
||||
CoordinateSystemPy::PyMake(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/)
|
||||
{
|
||||
// create a new instance of CoordinateSystemPy and the Twin object
|
||||
return new CoordinateSystemPy(new CoordinateSystem);
|
||||
|
||||
@@ -51,7 +51,7 @@ void Debugger::detach()
|
||||
isAttached = false;
|
||||
}
|
||||
|
||||
bool Debugger::eventFilter(QObject*, QEvent* event)
|
||||
bool Debugger::eventFilter(QObject* /*watched*/, QEvent* event)
|
||||
{
|
||||
if (event->type() == QEvent::KeyPress) {
|
||||
if (loop.isRunning()) {
|
||||
|
||||
@@ -76,7 +76,7 @@ int Handled::getRefCount() const
|
||||
return static_cast<int>(*_lRefCount);
|
||||
}
|
||||
|
||||
Handled& Handled::operator=(const Handled&)
|
||||
Handled& Handled::operator=(const Handled& /*unused*/)
|
||||
{
|
||||
// we must not assign _lRefCount
|
||||
return *this;
|
||||
|
||||
@@ -98,8 +98,8 @@ public:
|
||||
inline Vector3d operator*(const Vector3d& vec) const;
|
||||
inline void multVec(const Vector3d& src, Vector3d& dst) const;
|
||||
inline void multVec(const Vector3f& src, Vector3f& dst) const;
|
||||
inline Matrix4D operator*(double) const;
|
||||
inline Matrix4D& operator*=(double);
|
||||
inline Matrix4D operator*(double scalar) const;
|
||||
inline Matrix4D& operator*=(double scalar);
|
||||
/// Comparison
|
||||
inline bool operator!=(const Matrix4D& mat) const;
|
||||
/// Comparison
|
||||
@@ -119,11 +119,11 @@ public:
|
||||
/// Get trace of the 4x4 matrix
|
||||
inline double trace() const;
|
||||
/// Set row to vector
|
||||
inline void setRow(unsigned short usNdx, const Vector3d&);
|
||||
inline void setRow(unsigned short usNdx, const Vector3d& vec);
|
||||
/// Set column to vector
|
||||
inline void setCol(unsigned short usNdx, const Vector3d&);
|
||||
inline void setCol(unsigned short usNdx, const Vector3d& vec);
|
||||
/// Set diagonal to vector
|
||||
inline void setDiagonal(const Vector3d&);
|
||||
inline void setDiagonal(const Vector3d& vec);
|
||||
/// Compute the determinant of the matrix
|
||||
double determinant() const;
|
||||
/// Compute the determinant of the 3x3 sub-matrix
|
||||
|
||||
@@ -52,7 +52,7 @@ std::string MatrixPy::representation() const
|
||||
return str.str();
|
||||
}
|
||||
|
||||
PyObject* MatrixPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper
|
||||
PyObject* MatrixPy::PyMake(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/)
|
||||
{
|
||||
// create a new instance of MatrixPy and the Twin object
|
||||
return new MatrixPy(new Matrix4D);
|
||||
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
//@{
|
||||
|
||||
/** @ interface from DOMWriterFilter */
|
||||
FilterAction acceptNode(const XERCES_CPP_NAMESPACE_QUALIFIER DOMNode*) const override;
|
||||
FilterAction acceptNode(const XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* node) const override;
|
||||
//@{
|
||||
|
||||
ShowType getWhatToShow() const override
|
||||
@@ -2007,7 +2007,7 @@ void ParameterManager::CheckDocument() const
|
||||
// DOMTreeErrorReporter
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
void DOMTreeErrorReporter::warning(const SAXParseException&)
|
||||
void DOMTreeErrorReporter::warning(const SAXParseException& /*exc*/)
|
||||
{
|
||||
//
|
||||
// Ignore all warnings.
|
||||
|
||||
@@ -52,7 +52,7 @@ std::string PlacementPy::representation() const
|
||||
return str.str();
|
||||
}
|
||||
|
||||
PyObject* PlacementPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper
|
||||
PyObject* PlacementPy::PyMake(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/)
|
||||
{
|
||||
// create a new instance of PlacementPy and the Twin object
|
||||
return new PlacementPy(new Placement);
|
||||
|
||||
@@ -58,7 +58,8 @@ bool ProgressIndicatorPy::check(PyObject* py)
|
||||
return Py::PythonExtension<ProgressIndicatorPy>::check(py);
|
||||
}
|
||||
|
||||
PyObject* ProgressIndicatorPy::PyMake(struct _typeobject*, PyObject*, PyObject*)
|
||||
PyObject*
|
||||
ProgressIndicatorPy::PyMake(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/)
|
||||
{
|
||||
return new ProgressIndicatorPy();
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ PyObject* QuantityPy::toStr(PyObject* args)
|
||||
return Py_BuildValue("s", ret.str().c_str());
|
||||
}
|
||||
|
||||
PyObject* QuantityPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper
|
||||
PyObject* QuantityPy::PyMake(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/)
|
||||
{
|
||||
// create a new instance of QuantityPy and the Twin object
|
||||
return new QuantityPy(new Quantity);
|
||||
|
||||
@@ -504,7 +504,7 @@ bool Base::XMLReader::isRegistered(Base::Persistence* Object) const
|
||||
return false;
|
||||
}
|
||||
|
||||
void Base::XMLReader::addName(const char*, const char*)
|
||||
void Base::XMLReader::addName(const char* /*unused*/, const char* /*unused*/)
|
||||
{}
|
||||
|
||||
const char* Base::XMLReader::getName(const char* name) const
|
||||
|
||||
@@ -53,7 +53,7 @@ std::string RotationPy::representation() const
|
||||
return str.str();
|
||||
}
|
||||
|
||||
PyObject* RotationPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper
|
||||
PyObject* RotationPy::PyMake(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/)
|
||||
{
|
||||
// create a new instance of RotationPy and the Twin object
|
||||
return new RotationPy(new Rotation);
|
||||
|
||||
@@ -119,8 +119,8 @@ void SequencerBase::startStep()
|
||||
bool SequencerBase::next(bool canAbort)
|
||||
{
|
||||
this->nProgress++;
|
||||
float fDiv = this->nTotalSteps > 0 ? static_cast<float>(this->nTotalSteps) : 1000.0f;
|
||||
int perc = int((float(this->nProgress) * (100.0f / fDiv)));
|
||||
float fDiv = this->nTotalSteps > 0 ? static_cast<float>(this->nTotalSteps) : 1000.0F;
|
||||
int perc = int((float(this->nProgress) * (100.0F / fDiv)));
|
||||
|
||||
// do only an update if we have increased by one percent
|
||||
if (perc > this->_nLastPercentage) {
|
||||
@@ -135,10 +135,10 @@ bool SequencerBase::next(bool canAbort)
|
||||
return this->nProgress < this->nTotalSteps;
|
||||
}
|
||||
|
||||
void SequencerBase::nextStep(bool)
|
||||
void SequencerBase::nextStep(bool /*next*/)
|
||||
{}
|
||||
|
||||
void SequencerBase::setProgress(size_t)
|
||||
void SequencerBase::setProgress(size_t /*value*/)
|
||||
{}
|
||||
|
||||
bool SequencerBase::stop()
|
||||
@@ -204,7 +204,7 @@ void SequencerBase::resetData()
|
||||
this->_bCanceled = false;
|
||||
}
|
||||
|
||||
void SequencerBase::setText(const char*)
|
||||
void SequencerBase::setText(const char* /*text*/)
|
||||
{}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
@@ -219,7 +219,7 @@ void ConsoleSequencer::setText(const char* pszTxt)
|
||||
void ConsoleSequencer::startStep()
|
||||
{}
|
||||
|
||||
void ConsoleSequencer::nextStep(bool)
|
||||
void ConsoleSequencer::nextStep(bool /*canAbort*/)
|
||||
{
|
||||
if (this->nTotalSteps != 0) {
|
||||
printf("\t\t\t\t\t\t(%d %%)\t\r", progressInPercent());
|
||||
|
||||
@@ -299,7 +299,7 @@ protected:
|
||||
int_type overflow(int_type c = EOF) override;
|
||||
std::streamsize xsputn(const char* s, std::streamsize num) override;
|
||||
int sync() override;
|
||||
pos_type seekoff(off_type offset, seekdir dir, openmode) override;
|
||||
pos_type seekoff(off_type offset, seekdir dir, openmode mode) override;
|
||||
pos_type seekpos(pos_type offset, openmode mode) override;
|
||||
|
||||
private:
|
||||
|
||||
@@ -31,10 +31,10 @@ unsigned short Base::SwapOrder()
|
||||
return *((char*)&usDummy) == 1 ? LOW_ENDIAN : HIGH_ENDIAN;
|
||||
}
|
||||
|
||||
void Base::SwapVar(char&)
|
||||
void Base::SwapVar(char& /*unused*/)
|
||||
{}
|
||||
|
||||
void Base::SwapVar(unsigned char&)
|
||||
void Base::SwapVar(unsigned char& /*unused*/)
|
||||
{}
|
||||
|
||||
void Base::SwapVar(short& s)
|
||||
|
||||
@@ -95,7 +95,7 @@ float TimeInfo::diffTimeF(const TimeInfo& timeStart, const TimeInfo& timeEnd)
|
||||
int64_t ds = int64_t(timeEnd.getSeconds() - timeStart.getSeconds());
|
||||
int dms = int(timeEnd.getMiliseconds()) - int(timeStart.getMiliseconds());
|
||||
|
||||
return float(ds) + float(dms) * 0.001f;
|
||||
return float(ds) + float(dms) * 0.001F;
|
||||
}
|
||||
|
||||
TimeInfo TimeInfo::null()
|
||||
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
inline BoundBox2d(double fX1, double fY1, double fX2, double fY2);
|
||||
~BoundBox2d() = default;
|
||||
inline bool IsValid();
|
||||
inline bool IsEqual(const BoundBox2d&, double tolerance) const;
|
||||
inline bool IsEqual(const BoundBox2d& bbox, double tolerance) const;
|
||||
|
||||
// operators
|
||||
inline BoundBox2d& operator=(const BoundBox2d&) = default;
|
||||
@@ -471,16 +471,18 @@ inline bool BoundBox2d::IsValid()
|
||||
return (MaxX >= MinX) && (MaxY >= MinY);
|
||||
}
|
||||
|
||||
inline bool BoundBox2d::IsEqual(const BoundBox2d& b, double tolerance) const
|
||||
inline bool BoundBox2d::IsEqual(const BoundBox2d& bbox, double tolerance) const
|
||||
{
|
||||
return Vector2d(MinX, MinY).IsEqual(Vector2d(b.MinX, b.MinY), tolerance)
|
||||
&& Vector2d(MaxX, MaxY).IsEqual(Vector2d(b.MaxX, b.MaxY), tolerance);
|
||||
return Vector2d(MinX, MinY).IsEqual(Vector2d(bbox.MinX, bbox.MinY), tolerance)
|
||||
&& Vector2d(MaxX, MaxY).IsEqual(Vector2d(bbox.MaxX, bbox.MaxY), tolerance);
|
||||
}
|
||||
|
||||
inline bool BoundBox2d::operator==(const BoundBox2d& rclBB) const
|
||||
inline bool BoundBox2d::operator==(const BoundBox2d& bbox) const
|
||||
{
|
||||
return (MinX == rclBB.MinX) && (MinY == rclBB.MinY) && (MaxX == rclBB.MaxX)
|
||||
&& (MaxY == rclBB.MaxY);
|
||||
// clang-format off
|
||||
return (MinX == bbox.MinX) && (MinY == bbox.MinY)
|
||||
&& (MaxX == bbox.MaxX) && (MaxY == bbox.MaxY);
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
inline double BoundBox2d::Width() const
|
||||
|
||||
@@ -54,7 +54,7 @@ std::string UnitPy::representation() const
|
||||
return ret.str();
|
||||
}
|
||||
|
||||
PyObject* UnitPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper
|
||||
PyObject* UnitPy::PyMake(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/)
|
||||
{
|
||||
// create a new instance of UnitPy and the Twin object
|
||||
return new UnitPy(new Unit);
|
||||
|
||||
@@ -52,7 +52,7 @@ std::string VectorPy::representation() const
|
||||
return str.str();
|
||||
}
|
||||
|
||||
PyObject* VectorPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper
|
||||
PyObject* VectorPy::PyMake(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/)
|
||||
{
|
||||
// create a new instance of VectorPy and the Twin object
|
||||
return new VectorPy(new Vector3d);
|
||||
@@ -174,7 +174,7 @@ PyObject* VectorPy::number_multiply_handler(PyObject* self, PyObject* other)
|
||||
}
|
||||
}
|
||||
|
||||
Py_ssize_t VectorPy::sequence_length(PyObject*)
|
||||
Py_ssize_t VectorPy::sequence_length(PyObject* /*unused*/)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ Vector3f ViewProjMatrix::operator()(const Vector3f& inp) const
|
||||
if (!isOrthographic) {
|
||||
dst = src;
|
||||
perspectiveTransform<Vector3f>(_clMtx, dst);
|
||||
dst.Set(0.5f * dst.x + 0.5f, 0.5f * dst.y + 0.5f, 0.5f * dst.z + 0.5f);
|
||||
dst.Set(0.5F * dst.x + 0.5F, 0.5F * dst.y + 0.5F, 0.5F * dst.z + 0.5F);
|
||||
}
|
||||
else {
|
||||
_clMtx.multVec(src, dst);
|
||||
@@ -167,7 +167,7 @@ Vector3f ViewProjMatrix::inverse(const Vector3f& src) const
|
||||
{
|
||||
Vector3f dst;
|
||||
if (!isOrthographic) {
|
||||
dst.Set(2.0f * src.x - 1.0f, 2.0f * src.y - 1.0f, 2.0f * src.z - 1.0f);
|
||||
dst.Set(2.0F * src.x - 1.0F, 2.0F * src.y - 1.0F, 2.0F * src.z - 1.0F);
|
||||
perspectiveTransform<Vector3f>(_clMtxInv, dst);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -378,7 +378,7 @@ void FileWriter::putNextEntry(const char* file)
|
||||
this->FileStream.open(fileName.c_str(), std::ios::out | std::ios::binary);
|
||||
}
|
||||
|
||||
bool FileWriter::shouldWrite(const std::string&, const Base::Persistence*) const
|
||||
bool FileWriter::shouldWrite(const std::string& /*name*/, const Base::Persistence* /*obj*/) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user