mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-01-11 06:58:00 -05:00
* Add initial clang tidy / clang format config files * Clang format the entire codebase ``` find ./src -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none find ./include -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none find ./Web -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none find ./dev -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none find ./wrappers -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none ``` * Add a .cmake-format file and reformat CmakeLists.txt with it https://github.com/cheshirekow/cmake_format * Add a clang-format workflow only runs on PRs, only on touched files
21 lines
591 B
C++
21 lines
591 B
C++
#ifndef CROSSPLATFORM_SHARED_PTR
|
|
#define CROSSPLATFORM_SHARED_PTR
|
|
|
|
// By default, we use shared_ptr from the std namespace, and include the memory header,
|
|
// but some compilers need different treatment. Cmake provides the tools to
|
|
// ensure that the correct header is identified as a compile-time check, and we use
|
|
// that capability to change the include and/or the namespace
|
|
|
|
#if defined(SHARED_PTR_TR1_MEMORY_HEADER)
|
|
# include <tr1/memory>
|
|
#else
|
|
# include <memory>
|
|
#endif
|
|
|
|
#if defined(SHARED_PTR_TR1_NAMESPACE)
|
|
using std::tr1::shared_ptr;
|
|
#else
|
|
using std::shared_ptr;
|
|
#endif
|
|
|
|
#endif |