Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 10, 2024
1 parent 452361b commit da7c6b4
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 40 deletions.
4 changes: 2 additions & 2 deletions .ci/azure-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ steps:
- task: CMake@1
inputs:
cmakeArgs: .. -DCMAKE_CXX_STANDARD=$(utilities.std) -DCMAKE_BUILD_TYPE=$(utilities.build_type) $(utilities.options)
displayName: 'Configure'
displayName: "Configure"
env:
GIT_SSL_NO_VERIFY: 1

- script: cmake --build .
displayName: 'Build'
displayName: "Build"
workingDirectory: build
4 changes: 2 additions & 2 deletions .ci/azure-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ steps:
- task: ExtractFiles@1
inputs:
archiveFilePatterns: 'cmake*.tar.gz'
destinationFolder: 'cmake_program'
archiveFilePatterns: "cmake*.tar.gz"
destinationFolder: "cmake_program"
displayName: Extract CMake

- bash: echo "##vso[task.prependpath]$(Build.SourcesDirectory)/cmake_program/cmake-3.14.3-Linux-x86_64/bin"
Expand Down
6 changes: 3 additions & 3 deletions .ci/azure-test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
steps:
- script: ctest --output-on-failure -C $(utilities.build_type) -T test
displayName: 'Test'
displayName: "Test"
workingDirectory: build

- task: PublishTestResults@2
inputs:
testResultsFormat: 'cTest'
testResultsFiles: '**/Test.xml'
testResultsFormat: "cTest"
testResultsFiles: "**/Test.xml"
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- image: helics/buildenv:sanitizers-14
environment:
CMAKE_FLAGS: '-DCMAKE_CXX_FLAGS="-fsanitize=thread -g -O1 " '
TSAN_OPTIONS: 'second_deadlock_stack=1 suppressions=/root/project/.circleci/tsan_suppression.txt history_size=4'
TSAN_OPTIONS: "second_deadlock_stack=1 suppressions=/root/project/.circleci/tsan_suppression.txt history_size=4"

steps:
- checkout
Expand All @@ -27,9 +27,9 @@ jobs:
- image: helics/buildenv:sanitizers-14
environment:
CMAKE_FLAGS: '-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS="-fsanitize=undefined,address -lc++ -lc++abi -fsanitize-address-use-after-scope -Wno-unused-command-line-argument -fno-omit-frame-pointer -g -O1 -fsanitize-blacklist=/root/project/.circleci/asan_blacklist.txt" '
LSAN_OPTIONS: 'suppressions=/root/project/.circleci/leak_suppression.txt'
UBSAN_OPTIONS: 'print_stacktrace=1'
ASAN_OPTIONS: 'alloc_dealloc_mismatch=0'
LSAN_OPTIONS: "suppressions=/root/project/.circleci/leak_suppression.txt"
UBSAN_OPTIONS: "print_stacktrace=1"
ASAN_OPTIONS: "alloc_dealloc_mismatch=0"

steps:
- checkout
Expand Down
14 changes: 7 additions & 7 deletions .github/actions/cmake_config/action.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
description: 'Test out a bare bones configuration with a CMake version'
description: "Test out a bare bones configuration with a CMake version"
inputs:
version:
description: 'The full version of CMake to check'
description: "The full version of CMake to check"
required: true
options:
description: 'The CMake configuration options'
description: "The CMake configuration options"
required: false
default: ''
name: 'Configure with CMake'
default: ""
name: "Configure with CMake"
runs:
using: 'docker'
image: 'Dockerfile'
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.version }}
- ${{ inputs.options }}
12 changes: 6 additions & 6 deletions .github/actions/create-file-update-pr/action.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: 'Create File Update PR'
description: 'Pushes a new branch with changed files and opens a PR for updating the changed files in the base branch'
name: "Create File Update PR"
description: "Pushes a new branch with changed files and opens a PR for updating the changed files in the base branch"
inputs:
no-hash: # turn off inclusion of the hash in the created branch name
description: 'Do not include the changed file hash in the PR branch name'
description: "Do not include the changed file hash in the PR branch name"
default: false
replace-branch: # if a PR branch already exists, replaces it with updated contents
description: 'Replace the contents of an existing PR branch of the same name'
description: "Replace the contents of an existing PR branch of the same name"
default: false
runs:
using: 'docker'
image: 'Dockerfile'
using: "docker"
image: "Dockerfile"
24 changes: 8 additions & 16 deletions gmlc/utilities/timeRepresentation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -435,34 +435,29 @@ class TimeRepresentation {
#ifdef _DEBUG
constexpr explicit TimeRepresentation(
std::integral_constant<int, 0> /*unused*/) noexcept :
internalTimeCode(Tconv::zeroVal()),
doubleTimeValue(0.0)
internalTimeCode(Tconv::zeroVal()), doubleTimeValue(0.0)
{
}
constexpr explicit TimeRepresentation(
std::integral_constant<int, -1> /*unused*/) noexcept :
internalTimeCode(Tconv::minVal()),
doubleTimeValue(-1.456e47)
internalTimeCode(Tconv::minVal()), doubleTimeValue(-1.456e47)
{
}
constexpr explicit TimeRepresentation(
std::integral_constant<int, 1> /*unused*/) noexcept :
internalTimeCode(Tconv::maxVal()),
doubleTimeValue(1e49)
internalTimeCode(Tconv::maxVal()), doubleTimeValue(1e49)
{
}
constexpr explicit TimeRepresentation(
std::integral_constant<int, 2> /*unused*/) noexcept :
internalTimeCode(Tconv::epsilon()),
doubleTimeValue(1e-9)
internalTimeCode(Tconv::epsilon()), doubleTimeValue(1e-9)
{
}
constexpr TimeRepresentation(
std::integral_constant<int, 4> /*unused*/,
baseType initBaseVal,
double initDoubleTime) noexcept :
internalTimeCode(initBaseVal),
doubleTimeValue(initDoubleTime)
internalTimeCode(initBaseVal), doubleTimeValue(initDoubleTime)
{
}
#else
Expand All @@ -488,8 +483,7 @@ class TimeRepresentation {
}
constexpr TimeRepresentation(
std::integral_constant<int, 4> /*unused*/,
baseType initBaseVal) noexcept :
internalTimeCode(initBaseVal)
baseType initBaseVal) noexcept : internalTimeCode(initBaseVal)
{
}
#endif
Expand Down Expand Up @@ -519,13 +513,11 @@ class TimeRepresentation {
} // NOLINT
constexpr TimeRepresentation(
std::chrono::nanoseconds nsTime) noexcept // NOLINT
:
internalTimeCode(Tconv::convert(nsTime))
: internalTimeCode(Tconv::convert(nsTime))
{
}
constexpr TimeRepresentation(std::int64_t count, time_units units) noexcept
:
internalTimeCode(Tconv::fromCount(count, units))
: internalTimeCode(Tconv::fromCount(count, units))
{
}
#endif
Expand Down

0 comments on commit da7c6b4

Please sign in to comment.