Skip to content

Commit 05ca99d

Browse files
committed
Fixed warnings, one bug and dropped kdtree test out, due to inconsistency...
1 parent aeded18 commit 05ca99d

15 files changed

Lines changed: 27 additions & 29 deletions

File tree

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ env:
77
global:
88
- PYTHON=3.6
99
- MAKE_FLAGS=-j4
10-
- CXXFLAGS="-O0 -Wall -Wextra -march=native"
10+
- CXXFLAGS="-Wall -Wextra -march=native"
1111
addons:
1212
apt:
1313
update: true
@@ -32,11 +32,11 @@ before_script:
3232
- mkdir build
3333
- cd build
3434
- lcov --directory . --zerocounters
35-
- cmake -DCMAKE_BUILD_TYPE=Debug -DPR_USE_LTO=OFF -DPYBIND11_PYTHON_VERSION=$PYTHON ..
35+
- cmake -DCMAKE_BUILD_TYPE=Debug -DPR_USE_LTO_ONLY_RELEASE=ON -DPYBIND11_PYTHON_VERSION=$PYTHON ..
3636
script:
3737
- make $MAKE_FLAGS
3838
after_success:
39-
- make test
39+
- ctest --output-on-failure
4040
- make coveralls
4141
branches:
4242
only:

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
[![GitHub issues](https://img.shields.io/github/issues/PearCoding/PearRay.svg)](https://github.com/PearCoding/PearRay/issues)
44
[![Coverage Status](https://coveralls.io/repos/github/PearCoding/PearRay/badge.svg?branch=master)](https://coveralls.io/github/PearCoding/PearRay?branch=master)
55
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/48a91c3c277d4aa4ae76ff940e4bcf07)](https://www.codacy.com/app/PearCoding/PearRay?utm_source=github.com&utm_medium=referral&utm_content=PearCoding/PearRay&utm_campaign=Badge_Grade)\
6-
![CMake 3.1](https://img.shields.io/badge/CMake-3.1+-green.svg)
6+
![CMake 3.9](https://img.shields.io/badge/CMake-3.9+-green.svg)
77
![Language](https://img.shields.io/badge/language-c++-blue.svg)
88
![C++ Standard](https://img.shields.io/badge/std-c++14-blue.svg)
9-
![GCC 4.9](https://img.shields.io/badge/GCC-4.9+-blue.svg)
9+
![GCC 5](https://img.shields.io/badge/GCC-5+-blue.svg)
10+
![Clang 3.4](https://img.shields.io/badge/Clang-3.4+-blue.svg)
1011
![Language](https://img.shields.io/badge/language-Python-orange.svg)
1112
![Python](https://img.shields.io/badge/Python-2.7+-orange.svg)
1213
![Python](https://img.shields.io/badge/Python-3.5+-orange.svg)

src/diagnostic/widgets/RangeSlider.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ void RangeSlider::mousePressEvent(QMouseEvent* event)
155155
void RangeSlider::mouseMoveEvent(QMouseEvent* event)
156156
{
157157
const size_t wcw = width() - MIN_W;
158-
DrawStyle sty = calculateStyle();
159158

160159
auto posToValue = [&](int x) {
161160
return qMin(1.0f, qMax(0.0f,

src/diagnostic/widgets/RangeSlider.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ public slots:
3535

3636
private:
3737
struct DrawStyle {
38-
quint32 LeftKnobStart;
39-
quint32 RightKnobStart;
40-
quint32 SlideStart;
41-
quint32 SlideEnd;
38+
int LeftKnobStart;
39+
int RightKnobStart;
40+
int SlideStart;
41+
int SlideEnd;
4242
};
4343
DrawStyle calculateStyle() const;
4444

src/library/math/Tangent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ inline void frame(const Vector3fv& N, Vector3fv& Nx, Vector3fv& Ny)
3737
Ny /= Ny.norm();
3838
}
3939

40-
inline void invert_frame(Vector3f& N, Vector3f& Nx, Vector3f& Ny)
40+
inline void invert_frame(Vector3f& N, Vector3f& Nx, Vector3f& /*Ny*/)
4141
{
4242
N = -N;
4343
Nx = -Nx;

src/library/path/LPE_RegExpr.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace PR {
88
namespace LPE {
9-
/* Primarily based on
9+
/* Primarily based on
1010
https://www.codeguru.com/cpp/cpp/cpp_mfc/parsing/article.php/c4093/Write-Your-Own-Regular-Expression-Parser.htm
1111
* The initial implementation is changed to allow better dfa optimization and complements
1212
*/
@@ -158,7 +158,7 @@ void RegExpr::connect_to_initial(const std::shared_ptr<RegState>& state,
158158
{
159159
for (auto& s : tbl) {
160160
if (s->isInitial())
161-
state->addTransition(Token(), s);
161+
state->addTransition(token, s);
162162
}
163163
}
164164

@@ -168,7 +168,7 @@ void RegExpr::connect_from_final(const std::shared_ptr<RegState>& state,
168168
{
169169
for (auto& s : tbl) {
170170
if (s->isFinal())
171-
s->addTransition(Token(), state);
171+
s->addTransition(token, state);
172172
}
173173
}
174174

@@ -181,7 +181,7 @@ void RegExpr::connect_to_self(const Token& token,
181181
if (s->isInitial()) {
182182
for (auto& t : tbl) {
183183
if (t->isFinal())
184-
s->addTransition(Token(), t);
184+
s->addTransition(token, t);
185185
}
186186
}
187187
}
@@ -190,7 +190,7 @@ void RegExpr::connect_to_self(const Token& token,
190190
if (s->isFinal()) {
191191
for (auto& t : tbl) {
192192
if (t->isInitial())
193-
s->addTransition(Token(), t);
193+
s->addTransition(token, t);
194194
}
195195
}
196196
}

src/library/renderer/RenderTile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static std::unique_ptr<Sampler> createSampler(SamplerMode mode, Random& random,
2626
case SM_RANDOM:
2727
return std::make_unique<RandomSampler>(random);
2828
case SM_UNIFORM:
29-
return std::make_unique<UniformSampler>(random, samples);
29+
return std::make_unique<UniformSampler>(samples);
3030
case SM_JITTER:
3131
return std::make_unique<StratifiedSampler>(random, samples);
3232
default:

src/library/sampler/UniformSampler.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
#include "math/Projection.h"
33

44
namespace PR {
5-
UniformSampler::UniformSampler(Random& random, uint32 samples)
5+
UniformSampler::UniformSampler(uint32 samples)
66
: Sampler()
7-
, mRandom(random)
87
, mSamples(samples)
98
{
109
m2D_X = std::sqrt(samples);

src/library/sampler/UniformSampler.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
namespace PR {
66
class PR_LIB UniformSampler : public Sampler {
77
public:
8-
UniformSampler(Random& random, uint32 samples);
8+
UniformSampler(uint32 samples);
99
~UniformSampler();
1010

1111
float generate1D(uint32 index) override;
1212
Vector2f generate2D(uint32 index) override;
1313

1414
private:
15-
Random& mRandom;
1615
uint32 mSamples;
1716

1817
uint32 m2D_X;

src/plugins/main/entities/plane.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class PlaneEntity : public IEntity {
3939

4040
float surfaceArea(uint32 id) const override
4141
{
42-
if (id == 0 || mMaterialID < 0 || id == mMaterialID)
42+
if (id == 0 || mMaterialID < 0 || id == (uint32)mMaterialID)
4343
return mPlane.surfaceArea();
4444
else
4545
return 0;

0 commit comments

Comments
 (0)