Commit Graph

39 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
PhoneDroid
c913317c28 [ Base ]: Updated SPDX 2025-10-14 10:00:04 -05:00
Markus Reitböck
5a423dab39 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
496b31b087 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
0206ebc1e3 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
3ecdde8491 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
379fd2cf9b 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
77263e73af Base: Clean up ParameterManager::LoadDocument 2025-08-04 18:04:59 +02:00
Chris Hennes
773fc3c5b2 Base: Add missing header to PCH 2025-07-22 08:59:03 +02:00
Chris Hennes
787c190368 Remove boost::filesystem includes 2025-07-18 20:26:56 +02:00
Kohei Takahashi
0a78771733 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
cb51f3fd2c Base: Add #include <limits> where used 2025-03-31 23:50:30 +02:00
Benjamin Nauck
3253f2c2de Base: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:37 +01:00
PaddleStroke
643830624a Update PreCompiled.h 2025-03-03 10:21:37 -06:00
ii8
6724a85d35 Base: fix build on musl libc 2024-05-30 08:49:25 +02:00
Dov Grobgeld
5e37bf11f5 Add <algorithm> include and remove explicit 3rdparty/GSL include reference 2024-05-03 14:17:09 +02:00
Ladislav Michl
a691d6fcdc 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
411b7573cc Base: Use std::recursive_mutex 2024-01-21 16:14:12 +01:00
wmayer
985def3416 Base: apply clang format 2023-11-13 12:01:26 -05:00
wmayer
716ceecd02 Base: add helper function to convert a string of a triple of floats into Vector3f 2022-10-05 18:58:51 +02:00
berniev
5678fc1abe remove xcerces2 2022-09-09 08:02:35 +02:00
wmayer
9d041d8497 Base: implement loading of OpenInventor files (currently only SoIndexedFaceSet is supported) 2022-08-26 12:39:04 +02:00
wmayer
12e069779e Base: include header in PCH 2022-06-04 13:18:08 +02:00
wmayer
d21a60b294 All: modernize C++11
* replace deprecated headers
2022-03-23 22:44:18 +01:00
wmayer
b3c31309d5 Base: [skip ci] fix build failure if PCH is enabled 2022-03-20 13:34:32 +01:00
wmayer
a6e7bdf849 allow to enable PCH for gcc and clang 2021-05-03 17:37:58 +02:00
wmayer
8a855f67d9 Base: [skip ci] take care of case-sensitivity of header file 2021-02-18 10:17:03 +01:00
luz paz
01b21e0d06 Base: Fix header uniformity, whitespace, and doxygen
[skip ci]
2020-11-22 18:12:16 +01:00
wmayer
56c608932f Win: [skip ci] check if NOMINMAX is already defined before setting it 2020-11-11 13:34:42 +01:00
wmayer
c8dae9eb85 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
011e5aedfa 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
bd76bbd625 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
f6023d36d2 + rework BoundingBox class and its Python binding 2015-10-11 00:18:53 +02:00
Mateusz Skowroński
05f95c0506 Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
ebcda68b20 + utc time with timezone 2014-12-10 15:39:45 +01:00
wmayer
ae4d554021 Allow to save/load XML to/from buffer 2013-04-26 17:06:18 +02:00
wmayer
560da7d694 Use Qt's uuid implementation on Linux 2013-01-01 01:36:13 +01:00
wmayer
4c92ec056d 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