diff --git a/.github/workflows/linux-codeql.yml b/.github/workflows/linux-codeql.yml index 37bc638..f8b5224 100644 --- a/.github/workflows/linux-codeql.yml +++ b/.github/workflows/linux-codeql.yml @@ -110,17 +110,17 @@ jobs: if [ "${{matrix.version}}" = "15" ]; then wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|gpg --dearmor > llvm-snapshot.gpg sudo mv llvm-snapshot.gpg /etc/apt/trusted.gpg.d/ - sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" + sudo apt-add-repository "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" fi if [ "${{matrix.version}}" = "16" ]; then wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|gpg --dearmor > llvm-snapshot.gpg sudo mv llvm-snapshot.gpg /etc/apt/trusted.gpg.d/ - sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" + sudo apt-add-repository "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" fi if [ "${{matrix.version}}" = "17" ]; then wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|gpg --dearmor > llvm-snapshot.gpg sudo mv llvm-snapshot.gpg /etc/apt/trusted.gpg.d/ - sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" + sudo apt-add-repository "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" fi sudo apt update diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 9663ab6..101d3e1 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -110,17 +110,17 @@ jobs: if [ "${{matrix.version}}" = "15" ]; then wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|gpg --dearmor > llvm-snapshot.gpg sudo mv llvm-snapshot.gpg /etc/apt/trusted.gpg.d/ - sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" + sudo apt-add-repository "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" fi if [ "${{matrix.version}}" = "16" ]; then wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|gpg --dearmor > llvm-snapshot.gpg sudo mv llvm-snapshot.gpg /etc/apt/trusted.gpg.d/ - sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" + sudo apt-add-repository "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" fi if [ "${{matrix.version}}" = "17" ]; then wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|gpg --dearmor > llvm-snapshot.gpg sudo mv llvm-snapshot.gpg /etc/apt/trusted.gpg.d/ - sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" + sudo apt-add-repository "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" fi sudo apt update diff --git a/cmake/external/fmt.cmake b/cmake/external/fmt.cmake index 32f8c44..1b0a2ca 100644 --- a/cmake/external/fmt.cmake +++ b/cmake/external/fmt.cmake @@ -151,4 +151,4 @@ namespace std { }" ) -write_file(${FMT_INCLUDE_DIR}/format ${FMT_ABSTRACT}) +file(WRITE ${FMT_INCLUDE_DIR}/format ${FMT_ABSTRACT}) diff --git a/cmake/external/ranges.cmake b/cmake/external/ranges.cmake index 0178225..9066039 100644 --- a/cmake/external/ranges.cmake +++ b/cmake/external/ranges.cmake @@ -143,4 +143,4 @@ namespace std { " ) -write_file(${RANGES_INCLUDE_DIR}/ranges ${RANGES_ABSTRACT}) +file(WRITE ${RANGES_INCLUDE_DIR}/ranges ${RANGES_ABSTRACT}) diff --git a/examples/double/main.cpp b/examples/double/main.cpp index 42a5143..398e91e 100644 --- a/examples/double/main.cpp +++ b/examples/double/main.cpp @@ -148,17 +148,17 @@ std::int32_t main() { /* split */ std::cout << "----- Split" << std::endl; - std::pair splitted = vx::floating_point::split( first ); - std::cout << "split " << first << " result: " << splitted.first << " " << splitted.second << std::endl; + std::pair separated = vx::floating_point::split( first ); + std::cout << "split " << first << " result: " << separated.first << " " << separated.second << std::endl; - splitted = vx::floating_point::split( second ); - std::cout << "split " << second << " result: " << splitted.first << " " << splitted.second << std::endl; + separated = vx::floating_point::split( second ); + std::cout << "split " << second << " result: " << separated.first << " " << separated.second << std::endl; - splitted = vx::floating_point::split( third ); - std::cout << "split " << third << " result: " << splitted.first << " " << splitted.second << std::endl; + separated = vx::floating_point::split( third ); + std::cout << "split " << third << " result: " << separated.first << " " << separated.second << std::endl; - splitted = vx::floating_point::split( fourth ); - std::cout << "split " << fourth << " result: " << splitted.first << " " << splitted.second << std::endl; + separated = vx::floating_point::split( fourth ); + std::cout << "split " << fourth << " result: " << separated.first << " " << separated.second << std::endl; return EXIT_SUCCESS; } diff --git a/examples/threadqueue/main.cpp b/examples/threadqueue/main.cpp index 9337904..d2a28c6 100644 --- a/examples/threadqueue/main.cpp +++ b/examples/threadqueue/main.cpp @@ -43,9 +43,9 @@ /* local header */ #include "Item.h" -constexpr std::int32_t intervallSeconds = 1; +constexpr std::int32_t intervalSeconds = 1; constexpr std::int32_t secondsToMilliseconds = 100; -constexpr std::int32_t exitIntervall = 30; +constexpr std::int32_t exitInterval = 30; static inline void process( vx::SharedQueue &_queue, std::int32_t _threadId ) { @@ -68,7 +68,7 @@ static inline void process( vx::SharedQueue &_queue, std::int32_t main() { - std::int32_t intervall {}; + std::int32_t interval {}; vx::SharedQueue queue {}; @@ -92,14 +92,14 @@ std::int32_t main() { threads.emplace_back( process, std::ref( queue ), i ); } - auto intervallTimer = vx::Timer(); + auto intervalTimer = vx::Timer(); - const auto runOnInterval = [ &intervallTimer, &intervall, &queue ]() { - ++intervall; - std::cout << "Intervall: " << intervall << std::endl; + const auto runOnInterval = [ &intervalTimer, &interval, &queue ]() { + ++interval; + std::cout << "Interval: " << interval << std::endl; try { - queue.push( new Item( "Attached", intervall ) ); + queue.push( new Item( "Attached", interval ) ); } catch ( const std::bad_alloc &_exception ) { @@ -110,18 +110,18 @@ std::int32_t main() { std::cout << _exception.what() << std::endl; } - if ( intervall >= exitIntervall ) { + if ( interval >= exitInterval ) { - intervallTimer.stop(); + intervalTimer.stop(); } }; - intervallTimer.setInterval( intervallSeconds * secondsToMilliseconds, runOnInterval ); + intervalTimer.setInterval( intervalSeconds * secondsToMilliseconds, runOnInterval ); while ( true ) { /* Leave the app run infinity */ - if ( !intervallTimer.isRunning() ) { + if ( !intervalTimer.isRunning() ) { break; } diff --git a/examples/timer/main.cpp b/examples/timer/main.cpp index f70876e..08483e6 100644 --- a/examples/timer/main.cpp +++ b/examples/timer/main.cpp @@ -37,30 +37,30 @@ /* modern.cpp.core */ #include -constexpr std::int32_t intervallSeconds = 1; +constexpr std::int32_t intervalSeconds = 1; constexpr std::int32_t secondsToMilliseconds = 1000; constexpr std::int32_t exitSeconds = 15; std::int32_t main() { - std::int32_t intervall = 1; - auto intervallTimer = vx::Timer(); + std::int32_t interval = 1; + auto intervalTimer = vx::Timer(); - const auto runOnInterval = [ &intervallTimer, &intervall ]() { - std::cout << "Intervall: " << intervall << std::endl; - intervall++; - if ( intervall >= exitSeconds ) { + const auto runOnInterval = [ &intervalTimer, &interval ]() { + std::cout << "Interval: " << interval << std::endl; + interval++; + if ( interval >= exitSeconds ) { - intervallTimer.stop(); + intervalTimer.stop(); } }; - intervallTimer.setInterval( intervallSeconds * secondsToMilliseconds, runOnInterval ); + intervalTimer.setInterval( intervalSeconds * secondsToMilliseconds, runOnInterval ); while ( true ) { /* Leave the app run infinity */ - if ( !intervallTimer.isRunning() ) { + if ( !intervalTimer.isRunning() ) { break; } diff --git a/source/Demangle.cpp b/source/Demangle.cpp index 514adc3..3bb3776 100644 --- a/source/Demangle.cpp +++ b/source/Demangle.cpp @@ -53,7 +53,7 @@ namespace vx::demangle { #ifndef _WIN32 /** * 0: The demangling operation succeeded. - * -1: A memory allocation failiure occurred. + * -1: A memory allocation failure occurred. * -2: mangled_name is not a valid name under the C++ ABI mangling rules. * -3: One of the arguments is invalid. * */ diff --git a/source/Logger_container.h b/source/Logger_container.h index 59472e8..592d649 100644 --- a/source/Logger_container.h +++ b/source/Logger_container.h @@ -121,7 +121,7 @@ namespace vx::logger { } catch ( const std::bad_function_call &_exception ) { - /* Nothing to do here, the delimeter is not the most important thing here. */ + /* Nothing to do here, the delimiter is not the most important thing here. */ logFatal() << "bad_function_call:" << _exception.what(); } const bool saveState = _logger.autoSpace(); @@ -209,7 +209,7 @@ namespace vx::logger { } catch ( const std::bad_function_call &_exception ) { - /* Nothing to do here, the delimeter is not the most important thing here. */ + /* Nothing to do here, the delimiter is not the most important thing here. */ logFatal() << "bad_function_call:" << _exception.what(); } _logger.stream() << '{'; @@ -289,7 +289,7 @@ namespace vx::logger { } catch ( const std::bad_function_call &_exception ) { - /* Nothing to do here, the delimeter is not the most important thing here. */ + /* Nothing to do here, the delimiter is not the most important thing here. */ logFatal() << "bad_function_call:" << _exception.what(); } _logger.printTuple( pos, _tuple ); diff --git a/source/Serial.cpp b/source/Serial.cpp index 1f65ac8..c314109 100644 --- a/source/Serial.cpp +++ b/source/Serial.cpp @@ -42,7 +42,7 @@ #include #include -/* local haeder */ +/* local header */ #include "Cpp23.h" #include "Logger.h" #include "Serial.h" diff --git a/source/unixservice/main.cpp b/source/unixservice/main.cpp index d1e8610..dafc5df 100644 --- a/source/unixservice/main.cpp +++ b/source/unixservice/main.cpp @@ -97,7 +97,7 @@ std::int32_t main() { ::close( pos ); } - /* Alternative, some times it is needed not to close all file descriptors */ + /* Alternative, sometimes it is needed not to close all file descriptors */ // ::close( STDIN_FILENO ); // NOSONAR possible alternative solution // ::close( STDOUT_FILENO ); // NOSONAR possible alternative solution // ::close( STDERR_FILENO ); // NOSONAR possible alternative solution @@ -132,7 +132,7 @@ std::int32_t main() { if ( !currentPid.empty() && currentPid != str ) { /* Couldn't open lock file */ - ::syslog( LOG_INFO, "Service allready running as PID %s, exiting", currentPid.c_str() ); + ::syslog( LOG_INFO, "Service already running as PID %s, exiting", currentPid.c_str() ); std::exit( EXIT_FAILURE ); } @@ -150,7 +150,7 @@ std::int32_t main() { // DAEMONIZE END // SERVICE START - /* Daemon-specific intialization should go here */ + /* Daemon-specific initialization should go here */ // SERVICE END diff --git a/tests/test_floating_point.cpp b/tests/test_floating_point.cpp index 781eb44..28dba07 100644 --- a/tests/test_floating_point.cpp +++ b/tests/test_floating_point.cpp @@ -125,21 +125,21 @@ namespace vx { constexpr double third = 2.2345678; constexpr double fourth = 2.2335678; - std::pair splitted = floating_point::split( first ); - EXPECT_EQ( splitted.first, 1.0 ); - EXPECT_TRUE( floating_point::equal( splitted.second, 0.23 ) ); + std::pair separated = floating_point::split( first ); + EXPECT_EQ( separated.first, 1.0 ); + EXPECT_TRUE( floating_point::equal( separated.second, 0.23 ) ); - splitted = floating_point::split( second ); - EXPECT_EQ( splitted.first, 2.0 ); - EXPECT_TRUE( floating_point::equal( splitted.second, 0.2345678 ) ); + separated = floating_point::split(second ); + EXPECT_EQ( separated.first, 2.0 ); + EXPECT_TRUE( floating_point::equal( separated.second, 0.2345678 ) ); - splitted = floating_point::split( third ); - EXPECT_EQ( splitted.first, 2.0 ); - EXPECT_TRUE( floating_point::equal( splitted.second, 0.2345678 ) ); + separated = floating_point::split(third ); + EXPECT_EQ( separated.first, 2.0 ); + EXPECT_TRUE( floating_point::equal( separated.second, 0.2345678 ) ); - splitted = floating_point::split( fourth ); - EXPECT_EQ( splitted.first, 2.0 ); - EXPECT_TRUE( floating_point::equal( splitted.second, 0.2335678 ) ); + separated = floating_point::split(fourth ); + EXPECT_EQ( separated.first, 2.0 ); + EXPECT_TRUE( floating_point::equal( separated.second, 0.2335678 ) ); } } #ifdef __clang__ diff --git a/tests/test_point.cpp b/tests/test_point.cpp index bfdcd25..7f4bb4a 100644 --- a/tests/test_point.cpp +++ b/tests/test_point.cpp @@ -75,11 +75,11 @@ namespace vx { EXPECT_EQ( initializer.x(), 10 ); EXPECT_EQ( initializer.y(), 10 ); - /* Manhatten Length */ + /* Manhattan Length */ EXPECT_EQ( point.manhattanLength(), 20 ); EXPECT_EQ( point2.manhattanLength(), 10 ); - /* comparision */ + /* comparison */ EXPECT_TRUE( point == point3 ); EXPECT_FALSE( point == point2 ); EXPECT_FALSE( point == pointNull ); @@ -143,11 +143,11 @@ namespace vx { EXPECT_EQ( initializer.x(), 10.4F ); EXPECT_EQ( initializer.y(), 10.4F ); - /* Manhatten Length */ + /* Manhattan Length */ EXPECT_EQ( point.manhattanLength(), 20.8F ); EXPECT_EQ( point2.manhattanLength(), 10.8F ); - /* comparision */ + /* comparison */ EXPECT_TRUE( point == point3 ); EXPECT_FALSE( point == point2 ); EXPECT_FALSE( point == pointNull ); @@ -211,11 +211,11 @@ namespace vx { EXPECT_EQ( initializer.x(), 10.5 ); EXPECT_EQ( initializer.y(), 10.5 ); - /* Manhatten Length */ + /* Manhattan Length */ EXPECT_EQ( point.manhattanLength(), 21. ); EXPECT_EQ( point2.manhattanLength(), 11. ); - /* comparision */ + /* comparison */ EXPECT_TRUE( point == point3 ); EXPECT_FALSE( point == point2 ); EXPECT_FALSE( point == pointNull ); diff --git a/tests/test_size.cpp b/tests/test_size.cpp index 228a6fa..65fb9a3 100644 --- a/tests/test_size.cpp +++ b/tests/test_size.cpp @@ -78,7 +78,7 @@ namespace vx { EXPECT_EQ( initializer.width(), 10 ); EXPECT_EQ( initializer.height(), 10 ); - /* comparision */ + /* comparison */ EXPECT_TRUE( size == size3 ); EXPECT_FALSE( size == size2 ); EXPECT_FALSE( size == sizeNull ); @@ -142,7 +142,7 @@ namespace vx { EXPECT_EQ( initializer.width(), 10.4F ); EXPECT_EQ( initializer.height(), 10.4F ); - /* comparision */ + /* comparison */ EXPECT_TRUE( size == size3 ); EXPECT_FALSE( size == size2 ); EXPECT_FALSE( size == sizeNull ); @@ -206,7 +206,7 @@ namespace vx { EXPECT_EQ( initializer.width(), 10.5 ); EXPECT_EQ( initializer.height(), 10.5 ); - /* comparision */ + /* comparison */ EXPECT_TRUE( size == size3 ); EXPECT_FALSE( size == size2 ); EXPECT_FALSE( size == sizeNull ); diff --git a/tests/test_string_utils.cpp b/tests/test_string_utils.cpp index e2eaee4..971fbb9 100644 --- a/tests/test_string_utils.cpp +++ b/tests/test_string_utils.cpp @@ -109,7 +109,7 @@ namespace vx { std::string source = "The answer is 42."; EXPECT_FALSE( string_utils::endsWith( source, "xyz." ) ); - EXPECT_FALSE( string_utils::endsWith( source, "is fourty-two." ) ); + EXPECT_FALSE( string_utils::endsWith( source, "is forty-two." ) ); EXPECT_TRUE( string_utils::endsWith( source, "is 42." ) ); EXPECT_TRUE( string_utils::endsWith( source, "2." ) ); @@ -163,7 +163,7 @@ namespace vx { unsigned char chrArray[] = "The answer is 42."; // NOSONAR Just for testing purpose const unsigned char *chrPointer = chrArray; - /* A sanitizer will found that issue, so this is not useable for regular testing. */ + /* A sanitizer will found that issue, so this is not usable for regular testing. */ EXPECT_NE( string_utils::MAYBE_BAD_fromUnsignedChar( chrPointer, 17 + 10 ), "The answer is 42." ); }