Commit Graph

39 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
25c3ba7338 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
PhoneDroid
2a56489feb [ Base ]: Updated SPDX 2025-10-14 10:00:04 -05:00
Markus Reitböck
f0eca551b3 Base: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:01 +02:00
Markus Reitböck
749ac36615 do not use precompiled header for setting global compiler definitions and to disable compiler warnings
only 4 of these warnings are still relevant, CMake shall be used to disable them

Compiler definitions:

  NOMINMAX:
    * is already globally defined in SetGlobalCompilerAndLinkerSettings.cmake

  WIN32_LEAN_AND_MEAN:
    * use CMake target_compile_options on relevant targets

Warnings that still occur:

  C4251, C4273, C4275: all related to dllimport / export
    * use CMake target_compile_options on relevant targets

  C4661: no suitable definition provied for explicit template instantiation request
    * triggered in Mesh because of Vector3D in Base - not all functions are defined in header
    * use CMake target_compile_options on relevant targets

Warnings that are Currently not triggered (fix code if they appear again):

  C4005: macro redefinition

  C4244: argument conversion, possible loss of data

  C4267: conversion from size_t to type, possible loss of data

  C4305: truncation from type1 to type2
    * only occurrence disabled in Reader.cpp

  C4522: multiple assignment operator specified

  C5208: unnamed class in typedef name

Obsolete Compiler warnings:

  C4181: not mentioned in Microsoft docs anymore

  C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
    * throw(optional_type_list)  deprecated in C++17

  C4482: nonstandard extension used: enum 'enumeration' used in qualified name
    * not generated for compilers that support C++11

  C4503: 'identifier': decorated name length exceeded, name was truncated
    * obsolete since Visual Studio 2017

  C4786: not mentioned in Microsoft docs anymore
2025-09-11 20:21:04 -05:00
Chris Hennes
8221ab77d7 Merge pull request #23503 from maxwxyz/issue-22123
Fix STEP import with bad string behavior
2025-08-31 23:23:25 -05:00
Chris Hennes
c26e3e9756 Base: Allow all valid Python 3 identifier characters
Note: Does not check for keywords, only character classes (not a change from the original code).
2025-08-31 21:39:49 +02:00
wmayer
696c18b6da App: Fix output string to XML
Not all unicode characters are allowed as XML output. When writing disallowed characters the SAX parser throws an exception
when loading a project file that results into a broken document and thus to a possible loss of data.

This PR replaces all disallowed characters with an underscore and prints a warning.

This fixes https://github.com/FreeCAD/FreeCAD/issues/22123
Note: It does not fix an already corrupted project file.
2025-08-31 14:38:05 +02:00
Chris Hennes
eea9f81a90 Base: Clean up ParameterManager::LoadDocument 2025-08-04 18:04:59 +02:00
Chris Hennes
803a050082 Base: Add missing header to PCH 2025-07-22 08:59:03 +02:00
Chris Hennes
95a7dfd515 Remove boost::filesystem includes 2025-07-18 20:26:56 +02:00
Kohei Takahashi
b54898f05f Base: Fixed segfault on destructing cached string (#20563)
* Base: Fixed segfault on destructing cached string

Xerces default memory manager is deleted before destructing static local
variable and segfault.

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-05-15 17:23:03 +00:00
Benjamin Nauck
d9af862627 Base: Add #include <limits> where used 2025-03-31 23:50:30 +02:00
Benjamin Nauck
ae686942a7 Base: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:37 +01:00
PaddleStroke
50394a6ef3 Update PreCompiled.h 2025-03-03 10:21:37 -06:00
ii8
19dae94f01 Base: fix build on musl libc 2024-05-30 08:49:25 +02:00
Dov Grobgeld
960998ed42 Add <algorithm> include and remove explicit 3rdparty/GSL include reference 2024-05-03 14:17:09 +02:00
Ladislav Michl
159fe5c21f Base: Use std::chrono for time handling
Replace platform specific implementations with standard C++ std::chrono.
As time_t is now 64-bit on all supported systems, use it to set the clock.
2024-03-05 12:22:40 +01:00
Ladislav Michl
915bfd3dde Base: Use std::recursive_mutex 2024-01-21 16:14:12 +01:00
wmayer
e85c383bff Base: apply clang format 2023-11-13 12:01:26 -05:00
wmayer
e6798c53cf Base: add helper function to convert a string of a triple of floats into Vector3f 2022-10-05 18:58:51 +02:00
berniev
58cb977c3b remove xcerces2 2022-09-09 08:02:35 +02:00
wmayer
8b7f721cd0 Base: implement loading of OpenInventor files (currently only SoIndexedFaceSet is supported) 2022-08-26 12:39:04 +02:00
wmayer
f7f85464a3 Base: include header in PCH 2022-06-04 13:18:08 +02:00
wmayer
97330443a2 All: modernize C++11
* replace deprecated headers
2022-03-23 22:44:18 +01:00
wmayer
be56aa082e Base: [skip ci] fix build failure if PCH is enabled 2022-03-20 13:34:32 +01:00
wmayer
b69ef38c7f allow to enable PCH for gcc and clang 2021-05-03 17:37:58 +02:00
wmayer
0965fd4439 Base: [skip ci] take care of case-sensitivity of header file 2021-02-18 10:17:03 +01:00
luz paz
d5f6c096b8 Base: Fix header uniformity, whitespace, and doxygen
[skip ci]
2020-11-22 18:12:16 +01:00
wmayer
b7f9e351c5 Win: [skip ci] check if NOMINMAX is already defined before setting it 2020-11-11 13:34:42 +01:00
wmayer
2c113442a7 Qt5: 'void QTime::start()' / 'int QTime::elapsed() const' / 'int QTime::restart()' are deprecated: Use QElapsedTimer instead [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
luz.paz
6f11ed298a src/Base: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/Base` files
2019-12-25 11:38:58 +01:00
wmayer
ee63c324c1 Add an XSD validation scheme and implement ParameterManager::CheckDocument(), function is used in the parameter editor 2019-10-14 22:56:03 +02:00
wmayer
a4d1dbe5f0 + rework BoundingBox class and its Python binding 2015-10-11 00:18:53 +02:00
Mateusz Skowroński
43a4a5938c Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
ae3755cf01 + utc time with timezone 2014-12-10 15:39:45 +01:00
wmayer
3cb4cf6fe3 Allow to save/load XML to/from buffer 2013-04-26 17:06:18 +02:00
wmayer
408cc7c938 Use Qt's uuid implementation on Linux 2013-01-01 01:36:13 +01:00
wmayer
1859ec2559 Add utility class to better debug algorithms 2012-08-11 15:09:08 +02:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00