From 5c0fe24faee74424b4d9fddbe4ced88c05a8800f Mon Sep 17 00:00:00 2001 From: Daniel Wolf Date: Tue, 29 Dec 2015 16:26:01 +0100 Subject: [PATCH] Refactoring: Using camelCase throughout --- CMakeLists.txt | 24 +++++++++---------- src/appInfo.cpp.in | 4 ++++ src/{app_info.h => appInfo.h} | 0 src/app_info.cpp.in | 4 ---- src/{audio_input => audioInput}/AudioStream.h | 0 .../ChannelDownmixer.cpp | 0 .../ChannelDownmixer.h | 0 .../SampleRateConverter.cpp | 0 .../SampleRateConverter.h | 0 .../WaveFileReader.cpp | 2 +- .../WaveFileReader.h | 0 .../io_tools.h => audioInput/ioTools.h} | 0 .../waveFileWriting.cpp} | 4 ++-- .../waveFileWriting.h} | 0 src/main.cpp | 10 ++++---- ...mouth_animation.cpp => mouthAnimation.cpp} | 2 +- src/{mouth_animation.h => mouthAnimation.h} | 0 ...one_extraction.cpp => phoneExtraction.cpp} | 8 +++---- src/{phone_extraction.h => phoneExtraction.h} | 2 +- src/{platform_tools.cpp => platformTools.cpp} | 2 +- src/{platform_tools.h => platformTools.h} | 0 src/{string_tools.cpp => stringTools.cpp} | 2 +- src/{string_tools.h => stringTools.h} | 0 ...g_tools_tests.cpp => stringToolsTests.cpp} | 2 +- 24 files changed, 33 insertions(+), 33 deletions(-) create mode 100644 src/appInfo.cpp.in rename src/{app_info.h => appInfo.h} (100%) delete mode 100644 src/app_info.cpp.in rename src/{audio_input => audioInput}/AudioStream.h (100%) rename src/{audio_input => audioInput}/ChannelDownmixer.cpp (100%) rename src/{audio_input => audioInput}/ChannelDownmixer.h (100%) rename src/{audio_input => audioInput}/SampleRateConverter.cpp (100%) rename src/{audio_input => audioInput}/SampleRateConverter.h (100%) rename src/{audio_input => audioInput}/WaveFileReader.cpp (99%) rename src/{audio_input => audioInput}/WaveFileReader.h (100%) rename src/{audio_input/io_tools.h => audioInput/ioTools.h} (100%) rename src/{audio_input/wave_file_writing.cpp => audioInput/waveFileWriting.cpp} (96%) rename src/{audio_input/wave_file_writing.h => audioInput/waveFileWriting.h} (100%) rename src/{mouth_animation.cpp => mouthAnimation.cpp} (98%) rename src/{mouth_animation.h => mouthAnimation.h} (100%) rename src/{phone_extraction.cpp => phoneExtraction.cpp} (97%) rename src/{phone_extraction.h => phoneExtraction.h} (89%) rename src/{platform_tools.cpp => platformTools.cpp} (99%) rename src/{platform_tools.h => platformTools.h} (100%) rename src/{string_tools.cpp => stringTools.cpp} (98%) rename src/{string_tools.h => stringTools.h} (100%) rename tests/{string_tools_tests.cpp => stringToolsTests.cpp} (99%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4102bfc..8871a62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,22 +84,22 @@ set_target_properties(gtest_main PROPERTIES FOLDER lib) # Define executable include_directories("src" "src/audio_input") -configure_file(src/app_info.cpp.in src/app_info.cpp ESCAPE_QUOTES) +configure_file(src/appInfo.cpp.in src/appInfo.cpp ESCAPE_QUOTES) set(SOURCE_FILES - ${CMAKE_CURRENT_BINARY_DIR}/src/app_info.cpp + ${CMAKE_CURRENT_BINARY_DIR}/src/appInfo.cpp src/main.cpp src/Phone.cpp src/Shape.cpp src/centiseconds.cpp - src/mouth_animation.cpp - src/phone_extraction.cpp - src/platform_tools.cpp + src/mouthAnimation.cpp + src/phoneExtraction.cpp + src/platformTools.cpp src/tools.cpp - src/audio_input/ChannelDownmixer.cpp - src/audio_input/SampleRateConverter.cpp - src/audio_input/WaveFileReader.cpp - src/audio_input/wave_file_writing.cpp - src/string_tools.cpp + src/audioInput/ChannelDownmixer.cpp + src/audioInput/SampleRateConverter.cpp + src/audioInput/WaveFileReader.cpp + src/audioInput/waveFileWriting.cpp + src/stringTools.cpp ) add_executable(rhubarb ${SOURCE_FILES}) target_link_libraries(rhubarb ${Boost_LIBRARIES} cppFormat sphinxbase pocketSphinx) @@ -108,8 +108,8 @@ target_compile_options(rhubarb PUBLIC ${enableWarningsFlags}) # Define test project #include_directories("${gtest_SOURCE_DIR}/include") set(TEST_FILES - tests/string_tools_tests.cpp - src/string_tools.cpp + tests/stringToolsTests.cpp + src/stringTools.cpp ) add_executable(runTests ${TEST_FILES}) target_link_libraries(runTests gtest gmock gmock_main) diff --git a/src/appInfo.cpp.in b/src/appInfo.cpp.in new file mode 100644 index 0000000..bb7a242 --- /dev/null +++ b/src/appInfo.cpp.in @@ -0,0 +1,4 @@ +#include "appInfo.h" + +const std::string appName = "@appName@"; +const std::string appVersion = "@appVersion@"; \ No newline at end of file diff --git a/src/app_info.h b/src/appInfo.h similarity index 100% rename from src/app_info.h rename to src/appInfo.h diff --git a/src/app_info.cpp.in b/src/app_info.cpp.in deleted file mode 100644 index d5b3239..0000000 --- a/src/app_info.cpp.in +++ /dev/null @@ -1,4 +0,0 @@ -#include "app_info.h" - -const std::string appName = "@appName@"; -const std::string appVersion = "@appVersion@"; \ No newline at end of file diff --git a/src/audio_input/AudioStream.h b/src/audioInput/AudioStream.h similarity index 100% rename from src/audio_input/AudioStream.h rename to src/audioInput/AudioStream.h diff --git a/src/audio_input/ChannelDownmixer.cpp b/src/audioInput/ChannelDownmixer.cpp similarity index 100% rename from src/audio_input/ChannelDownmixer.cpp rename to src/audioInput/ChannelDownmixer.cpp diff --git a/src/audio_input/ChannelDownmixer.h b/src/audioInput/ChannelDownmixer.h similarity index 100% rename from src/audio_input/ChannelDownmixer.h rename to src/audioInput/ChannelDownmixer.h diff --git a/src/audio_input/SampleRateConverter.cpp b/src/audioInput/SampleRateConverter.cpp similarity index 100% rename from src/audio_input/SampleRateConverter.cpp rename to src/audioInput/SampleRateConverter.cpp diff --git a/src/audio_input/SampleRateConverter.h b/src/audioInput/SampleRateConverter.h similarity index 100% rename from src/audio_input/SampleRateConverter.h rename to src/audioInput/SampleRateConverter.h diff --git a/src/audio_input/WaveFileReader.cpp b/src/audioInput/WaveFileReader.cpp similarity index 99% rename from src/audio_input/WaveFileReader.cpp rename to src/audioInput/WaveFileReader.cpp index 616d281..fcf13ab 100644 --- a/src/audio_input/WaveFileReader.cpp +++ b/src/audioInput/WaveFileReader.cpp @@ -1,6 +1,6 @@ #include #include "WaveFileReader.h" -#include "io_tools.h" +#include "ioTools.h" using std::runtime_error; using fmt::format; diff --git a/src/audio_input/WaveFileReader.h b/src/audioInput/WaveFileReader.h similarity index 100% rename from src/audio_input/WaveFileReader.h rename to src/audioInput/WaveFileReader.h diff --git a/src/audio_input/io_tools.h b/src/audioInput/ioTools.h similarity index 100% rename from src/audio_input/io_tools.h rename to src/audioInput/ioTools.h diff --git a/src/audio_input/wave_file_writing.cpp b/src/audioInput/waveFileWriting.cpp similarity index 96% rename from src/audio_input/wave_file_writing.cpp rename to src/audioInput/waveFileWriting.cpp index 0dc8f20..f75625c 100644 --- a/src/audio_input/wave_file_writing.cpp +++ b/src/audioInput/waveFileWriting.cpp @@ -1,6 +1,6 @@ #include -#include "wave_file_writing.h" -#include "io_tools.h" +#include "waveFileWriting.h" +#include "ioTools.h" using namespace little_endian; diff --git a/src/audio_input/wave_file_writing.h b/src/audioInput/waveFileWriting.h similarity index 100% rename from src/audio_input/wave_file_writing.h rename to src/audioInput/waveFileWriting.h diff --git a/src/main.cpp b/src/main.cpp index b4b47b3..ed1d5f5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,11 +3,11 @@ #include #include #include -#include "audio_input/WaveFileReader.h" -#include "phone_extraction.h" -#include "mouth_animation.h" -#include "platform_tools.h" -#include "app_info.h" +#include "audioInput/WaveFileReader.h" +#include "phoneExtraction.h" +#include "mouthAnimation.h" +#include "platformTools.h" +#include "appInfo.h" using std::exception; using std::string; diff --git a/src/mouth_animation.cpp b/src/mouthAnimation.cpp similarity index 98% rename from src/mouth_animation.cpp rename to src/mouthAnimation.cpp index 87b73d6..aa8cbf4 100644 --- a/src/mouth_animation.cpp +++ b/src/mouthAnimation.cpp @@ -1,4 +1,4 @@ -#include "mouth_animation.h" +#include "mouthAnimation.h" #include using std::map; diff --git a/src/mouth_animation.h b/src/mouthAnimation.h similarity index 100% rename from src/mouth_animation.h rename to src/mouthAnimation.h diff --git a/src/phone_extraction.cpp b/src/phoneExtraction.cpp similarity index 97% rename from src/phone_extraction.cpp rename to src/phoneExtraction.cpp index b81a4ce..faf38b7 100644 --- a/src/phone_extraction.cpp +++ b/src/phoneExtraction.cpp @@ -1,10 +1,10 @@ #include #include #include -#include "phone_extraction.h" -#include "audio_input/SampleRateConverter.h" -#include "audio_input/ChannelDownmixer.h" -#include "platform_tools.h" +#include "phoneExtraction.h" +#include "audioInput/SampleRateConverter.h" +#include "audioInput/ChannelDownmixer.h" +#include "platformTools.h" #include "tools.h" extern "C" { diff --git a/src/phone_extraction.h b/src/phoneExtraction.h similarity index 89% rename from src/phone_extraction.h rename to src/phoneExtraction.h index 844f30a..ce5a7a3 100644 --- a/src/phone_extraction.h +++ b/src/phoneExtraction.h @@ -5,7 +5,7 @@ #include #include #include -#include "audio_input/AudioStream.h" +#include "audioInput/AudioStream.h" #include "Phone.h" #include "centiseconds.h" diff --git a/src/platform_tools.cpp b/src/platformTools.cpp similarity index 99% rename from src/platform_tools.cpp rename to src/platformTools.cpp index 72249d6..940add4 100644 --- a/src/platform_tools.cpp +++ b/src/platformTools.cpp @@ -3,7 +3,7 @@ #include #include -#include "platform_tools.h" +#include "platformTools.h" using boost::filesystem::path; diff --git a/src/platform_tools.h b/src/platformTools.h similarity index 100% rename from src/platform_tools.h rename to src/platformTools.h diff --git a/src/string_tools.cpp b/src/stringTools.cpp similarity index 98% rename from src/string_tools.cpp rename to src/stringTools.cpp index c1801e9..657d85d 100644 --- a/src/string_tools.cpp +++ b/src/stringTools.cpp @@ -1,4 +1,4 @@ -#include "string_tools.h" +#include "stringTools.h" #include using std::string; diff --git a/src/string_tools.h b/src/stringTools.h similarity index 100% rename from src/string_tools.h rename to src/stringTools.h diff --git a/tests/string_tools_tests.cpp b/tests/stringToolsTests.cpp similarity index 99% rename from tests/string_tools_tests.cpp rename to tests/stringToolsTests.cpp index a9777fc..b30f630 100644 --- a/tests/string_tools_tests.cpp +++ b/tests/stringToolsTests.cpp @@ -1,5 +1,5 @@ #include -#include "string_tools.h" +#include "stringTools.h" using namespace testing;