Skip to content

Commit 6aafbb3

Browse files
committed
Remove superfluous constructor, fix missing include and move unreachable
1 parent e103e88 commit 6aafbb3

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

custom/sinc.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
// g++ -std=c++17 -I${ftxui}/include -L${ftxui}/build minimal.cpp -lftxui-component -lftxui-dom -lftxui-screen -o minimal -I{googletest}/include -L{googletest}/lib -lgtest
1+
// g++ -std=c++17 -I${ftxui}/include -L${ftxui}/build sinc.cpp -lftxui-component -lftxui-dom -lftxui-screen -o sinc -I{googletest}/include -L{googletest}/lib -lgtest
22
// https://stackoverflow.com/questions/78284124/configuring-a-project-with-ftxui-in-visual-studio-code
33

44
#include <cmath>
5+
#include <cstring>
56
#include <thread>
67
#include <variant>
78
#include <vector>
@@ -39,15 +40,12 @@ auto make_samples_vector(WaveSampleFormat wsf) -> variant_vector {
3940
default:
4041
throw std::runtime_error("Unexpected sample format!");
4142
}
42-
unreachable();
4343
}
4444

4545
struct Wave {
4646
std::vector<std::byte> data;
4747
int wave_sample_size = 0;
4848

49-
Wave() {}
50-
5149
Wave(WaveSampleFormat wsf) {
5250
wave_sample_size = [wsf]() {
5351
switch (wsf) {
@@ -56,6 +54,7 @@ struct Wave {
5654
case WaveSampleFormat::F64:
5755
return 8;
5856
}
57+
unreachable();
5958
}();
6059
}
6160

0 commit comments

Comments
 (0)