Skip to content

Commit

Permalink
Fix a lot of typos
Browse files Browse the repository at this point in the history
  • Loading branch information
florianbecker committed Jan 21, 2024
1 parent 14f4731 commit 9e96d96
Show file tree
Hide file tree
Showing 15 changed files with 69 additions and 69 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/linux-codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cmake/external/fmt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,4 @@ namespace std {
}"
)

write_file(${FMT_INCLUDE_DIR}/format ${FMT_ABSTRACT})
file(WRITE ${FMT_INCLUDE_DIR}/format ${FMT_ABSTRACT})
2 changes: 1 addition & 1 deletion cmake/external/ranges.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ namespace std {
"
)

write_file(${RANGES_INCLUDE_DIR}/ranges ${RANGES_ABSTRACT})
file(WRITE ${RANGES_INCLUDE_DIR}/ranges ${RANGES_ABSTRACT})
16 changes: 8 additions & 8 deletions examples/double/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,17 @@ std::int32_t main() {
/* split */
std::cout << "----- Split" << std::endl;

std::pair<double, double> splitted = vx::floating_point::split( first );
std::cout << "split " << first << " result: " << splitted.first << " " << splitted.second << std::endl;
std::pair<double, double> 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;
}
24 changes: 12 additions & 12 deletions examples/threadqueue/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Item *> &_queue,
std::int32_t _threadId ) {
Expand All @@ -68,7 +68,7 @@ static inline void process( vx::SharedQueue<Item *> &_queue,

std::int32_t main() {

std::int32_t intervall {};
std::int32_t interval {};

vx::SharedQueue<Item *> queue {};

Expand All @@ -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 ) {

Expand All @@ -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;
}
Expand Down
20 changes: 10 additions & 10 deletions examples/timer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,30 @@
/* modern.cpp.core */
#include <Timer.h>

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;
}
Expand Down
2 changes: 1 addition & 1 deletion source/Demangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* */
Expand Down
6 changes: 3 additions & 3 deletions source/Logger_container.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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() << '{';
Expand Down Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion source/Serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include <chrono>
#include <vector>

/* local haeder */
/* local header */
#include "Cpp23.h"
#include "Logger.h"
#include "Serial.h"
Expand Down
6 changes: 3 additions & 3 deletions source/unixservice/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 );
}

Expand All @@ -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

Expand Down
24 changes: 12 additions & 12 deletions tests/test_floating_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,21 @@ namespace vx {
constexpr double third = 2.2345678;
constexpr double fourth = 2.2335678;

std::pair<double, double> splitted = floating_point::split( first );
EXPECT_EQ( splitted.first, 1.0 );
EXPECT_TRUE( floating_point::equal( splitted.second, 0.23 ) );
std::pair<double, double> 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__
Expand Down
12 changes: 6 additions & 6 deletions tests/test_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down
6 changes: 3 additions & 3 deletions tests/test_size.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down
4 changes: 2 additions & 2 deletions tests/test_string_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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." ) );

Expand Down Expand Up @@ -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." );
}

Expand Down

0 comments on commit 9e96d96

Please sign in to comment.