mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-31 14:52:01 +08:00
Fix some compilation warnings
This commit is contained in:
parent
450a918cea
commit
5a1e8e0f65
@ -11,6 +11,9 @@ use Module::Build::WithXSpp;
|
||||
my $cpp_guess = ExtUtils::CppGuess->new;
|
||||
my $mswin = $^O eq 'MSWin32';
|
||||
|
||||
# prevent an annoying concatenation warning by Devel::CheckLib
|
||||
$ENV{LD_RUN_PATH} //= "";
|
||||
|
||||
# _GLIBCXX_USE_C99 : to get the long long type for g++
|
||||
# HAS_BOOL : stops Perl/lib/CORE/handy.h from doing "# define bool char" for MSVC
|
||||
# NOGDI : prevents inclusion of wingdi.h which defines functions Polygon() and Polyline() in global namespace
|
||||
@ -199,6 +202,9 @@ if ($cpp_guess->is_gcc) {
|
||||
# https://svn.boost.org/trac/boost/ticket/8695
|
||||
push @cflags, qw(-fno-inline-small-functions);
|
||||
}
|
||||
|
||||
# our templated XS bindings cause undefined-var-template warnings
|
||||
push @cflags, qw(-Wno-undefined-var-template);
|
||||
}
|
||||
|
||||
my $build = Module::Build::WithXSpp->new(
|
||||
|
16
xs/MANIFEST
16
xs/MANIFEST
@ -1,5 +1,6 @@
|
||||
Build.PL
|
||||
lib/Slic3r/XS.pm
|
||||
libslic3r.doxygen
|
||||
MANIFEST This list of files
|
||||
src/admesh/connect.c
|
||||
src/admesh/normals.c
|
||||
@ -8,6 +9,21 @@ src/admesh/stl.h
|
||||
src/admesh/stl_io.c
|
||||
src/admesh/stlinit.c
|
||||
src/admesh/util.c
|
||||
src/boost/nowide/args.hpp
|
||||
src/boost/nowide/cenv.hpp
|
||||
src/boost/nowide/config.hpp
|
||||
src/boost/nowide/convert.hpp
|
||||
src/boost/nowide/cstdio.hpp
|
||||
src/boost/nowide/cstdlib.hpp
|
||||
src/boost/nowide/filebuf.hpp
|
||||
src/boost/nowide/fstream.hpp
|
||||
src/boost/nowide/integration/filesystem.hpp
|
||||
src/boost/nowide/iostream.cpp
|
||||
src/boost/nowide/iostream.hpp
|
||||
src/boost/nowide/stackstring.hpp
|
||||
src/boost/nowide/system.hpp
|
||||
src/boost/nowide/utf8_codecvt.hpp
|
||||
src/boost/nowide/windows.hpp
|
||||
src/clipper.cpp
|
||||
src/clipper.hpp
|
||||
src/expat/ascii.h
|
||||
|
@ -684,7 +684,7 @@ TriangleMesh::make_sphere(double rho, double fa) {
|
||||
// Fixed scaling
|
||||
const double z = -rho + increment*rho*2.0;
|
||||
// radius of the circle for this step.
|
||||
const double r = sqrt(abs(rho*rho - z*z));
|
||||
const double r = sqrt(std::abs(rho*rho - z*z));
|
||||
Pointf3 b(0, r, z);
|
||||
b.rotate(ring[i], Pointf3(0,0,z));
|
||||
vertices.push_back(b);
|
||||
@ -699,7 +699,7 @@ TriangleMesh::make_sphere(double rho, double fa) {
|
||||
// General case: insert and form facets for each step, joining it to the ring below it.
|
||||
for (size_t s = 2; s < steps - 1; s++) {
|
||||
const double z = -rho + increment*(double)s*2.0*rho;
|
||||
const double r = sqrt(abs(rho*rho - z*z));
|
||||
const double r = sqrt(std::abs(rho*rho - z*z));
|
||||
|
||||
for (size_t i = 0; i < ring.size(); i++) {
|
||||
Pointf3 b(0, r, z);
|
||||
|
Loading…
x
Reference in New Issue
Block a user