Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DLL compile issue @ 32bit platform only #727

Closed
rs0xFFFF opened this issue Nov 26, 2023 · 2 comments
Closed

DLL compile issue @ 32bit platform only #727

rs0xFFFF opened this issue Nov 26, 2023 · 2 comments

Comments

@rs0xFFFF
Copy link

Possible data loss: "T" in "size_t"
T=int64_t

1>------ Neues Erstellen gestartet: Projekt: Clipper2_Export, Konfiguration: Debug Win32 ------
1>clipper.engine.cpp
1>clipper.offset.cpp
1>D:\Delphi\Clipper2\CPP\Clipper2Lib\src\clipper.offset.cpp(642,20): warning C4244: "Argument": Konvertierung von "int64_t" in "const unsigned int", möglicher Datenverlust
1>clipper.rectclip.cpp
1>dllmain.cpp
1>D:\Delphi\Clipper2\CPP\Clipper2Lib\include\clipper2\clipper.export.h(306,18): warning C4244: "Argument": Konvertierung von "int64_t" in "const unsigned int", möglicher Datenverlust
1>D:\Delphi\Clipper2\CPP\Clipper2Lib\include\clipper2\clipper.export.h(312,18): warning C4244: "Argument": Konvertierung von "int64_t" in "const unsigned int", möglicher Datenverlust
1>D:\Delphi\Clipper2\CPP\Clipper2Lib\include\clipper2\clipper.export.h(280,14): warning C4244: "Initialisierung": Konvertierung von "T" in "size_t", möglicher Datenverlust
1> with
1> [
1> T=int64_t
1> ]
1>D:\Delphi\Clipper2\CPP\Clipper2Lib\include\clipper2\clipper.export.h(375): message : Siehe Verweis auf die gerade kompilierte Instanziierung "std::vector<Clipper2Lib::Path64,std::allocatorClipper2Lib::Path64> Clipper2Lib::ConvertCPaths<int64_t>(T *)" der Funktions-Vorlage.
1> with
1> [
1> T=int64_t
1> ]
1>D:\Delphi\Clipper2\CPP\Clipper2Lib\include\clipper2\clipper.export.h(284,17): warning C4244: "Initialisierung": Konvertierung von "T" in "size_t", möglicher Datenverlust
1> with
1> [
1> T=int64_t
1> ]
1>pch.cpp
1>Code wird generiert...
1> Bibliothek "D:\Delphi\Clipper2\DLL\CPP_DLL\Debug\Clipper2_32.lib" und Objekt "D:\Delphi\Clipper2\DLL\CPP_DLL\Debug\Clipper2_32.exp" werden erstellt.
1>Clipper2_Export.vcxproj -> D:\Delphi\Clipper2\DLL\CPP_DLL\Debug\Clipper2_32.dll
1>Erstellen des Projekts Clipper2_Export.vcxproj beendet.
========== Alles neu erstellen: 1 erfolgreich, 0 fehlerhaft, 0 übersprungen ==========

@AngusJohnson
Copy link
Owner

Replace:

int64_t sol_size = 0;

With:
Paths64::size_type sol_size = 0;

AngusJohnson added a commit that referenced this issue Nov 28, 2023
1. Fixed a significant offsetting bug introduced in previous update (#733)
2. Fixed a C++ compile error when 32bit compiling (#727)
3. Minor tweak to CMakeLists.txt (C++) (#728)
4. Will now offset 'flat' polygons (Disc.#725)
5. Reminder: recent change in open path offsetting behaviour (#707)
6. Reminder: recent changes to clipper.export.h data structures.
@rs0xFFFF
Copy link
Author

rs0xFFFF commented Dec 1, 2023

Hi Angus!
I still see these warnings in today's trunk.
best regards!

jiajuncccc added a commit to jiajuncccc/Clipper2 that referenced this issue Dec 15, 2023
* remotes/origin/main:
  Minor code tidy
  Added CLIPPER2_HI_PRECISION option in CMakeLists.txt
  Additional minor tweaks to cpp/benchmark tests
  Make googletest not be a git submodule, and instead clone it separately in the CI script (AngusJohnson#745)
  fix compiler warning of -Wunused-but-set-parameter with -fno-exceptions (AngusJohnson#744)
  Additional tweaks to GetIntersectPtBenchmark.cpp
  Additional GetIntersectPtBenchmark tweaks
  Fixed incorrect code comment
  Added new GetIntersectPoint benchmark test Updated other benchmark tests.
  Code formatting only (removed trailing spaces)
  Fixed minor typecasting issues (AngusJohnson#727)
  More tweaks to PointInPolygon benchmarking.
  Allow using external gtest with GTest:: qualified names (AngusJohnson#737)
  Fixed a significant (though uncommon) bug in polygon clipping (AngusJohnson#736) Fixed bugs in PointInPolygon benchmark testing.
  Minor tweaks to PointInPolygon benchmark testing.
  Fixed a minor syntax error tripping some C++ compilers
  Version 1.3.0 1. Fixed a significant offsetting bug introduced in previous update (AngusJohnson#733) 2. Fixed a C++ compile error when 32bit compiling (AngusJohnson#727) 3. Minor tweak to CMakeLists.txt (C++) (AngusJohnson#728) 4. Will now offset 'flat' polygons (Disc.AngusJohnson#725) 5. Reminder: recent change in open path offsetting behaviour (AngusJohnson#707) 6. Reminder: recent changes to clipper.export.h data structures.
  Fixed a typo and tweaked documentation
  Version 1.2.4   Changes since ver 1.2.3 include:   1. Important: Offsetting open path behaviour has changed.      The delta now behaves as it did in Clipper1 (See Issue AngusJohnson#707)   2. Important: Data structures of exported values in clipper.export.h have changed.   3. Minor bugfixes to PolyTree nesting (AngusJohnson#679, AngusJohnson#687)   4. Numerous minor bugfixes to polygon offsetting (AngusJohnson#703, AngusJohnson#715, AngusJohnson#724)   5. Fixed an obscure bug in polygon clipping caused by horizontal spikes (AngusJohnson#720)   6. Significantly improved documentation.
  Additional minor bugfix to ClipperOffset (AngusJohnson#724 & Disc.AngusJohnson#726)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants