Using #pragma once instead of include guards
Just looks cleaner
This commit is contained in:
parent
9e9a432f70
commit
f14feefeb0
|
@ -1,5 +1,4 @@
|
|||
#ifndef RHUBARB_LIP_SYNC_NICECMDLINEOUTPUT_H
|
||||
#define RHUBARB_LIP_SYNC_NICECMDLINEOUTPUT_H
|
||||
#pragma once
|
||||
|
||||
#include <tclap/StdOutput.h>
|
||||
|
||||
|
@ -15,5 +14,3 @@ private:
|
|||
// Writes a longer usage message with long and short args, providing descriptions
|
||||
void printLongUsage(TCLAP::CmdLineInterface& cli, std::ostream& outStream) const;
|
||||
};
|
||||
|
||||
#endif //RHUBARB_LIP_SYNC_NICECMDLINEOUTPUT_H
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#ifndef LIPSYNC_PHONE_H
|
||||
#define LIPSYNC_PHONE_H
|
||||
#pragma once
|
||||
|
||||
// Defines a subset of the Arpabet
|
||||
enum class Phone {
|
||||
|
@ -75,5 +74,3 @@ Phone stringToPhone(const std::string& s);
|
|||
std::string phoneToString(Phone phone);
|
||||
|
||||
std::ostream& operator <<(std::ostream& stream, const Phone phone);
|
||||
|
||||
#endif //LIPSYNC_PHONE_H
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#ifndef LIPSYNC_SHAPE_H
|
||||
#define LIPSYNC_SHAPE_H
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -21,5 +20,3 @@ enum class Shape {
|
|||
std::string shapeToString(Shape shape);
|
||||
|
||||
std::ostream& operator <<(std::ostream& stream, const Shape shape);
|
||||
|
||||
#endif //LIPSYNC_SHAPE_H
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#ifndef RHUBARB_LIP_SYNC_TABLEPRINTER_H
|
||||
#define RHUBARB_LIP_SYNC_TABLEPRINTER_H
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <initializer_list>
|
||||
|
@ -15,5 +14,3 @@ private:
|
|||
const std::vector<int> columnWidths;
|
||||
const int columnSpacing;
|
||||
};
|
||||
|
||||
#endif //RHUBARB_LIP_SYNC_TABLEPRINTER_H
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
#ifndef APP_INFO_H
|
||||
#define APP_INFO_H
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
extern const std::string appName;
|
||||
extern const std::string appVersion;
|
||||
|
||||
#endif //APP_INFO_H
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#ifndef LIPSYNC_AUDIOSTREAM_H
|
||||
#define LIPSYNC_AUDIOSTREAM_H
|
||||
#pragma once
|
||||
|
||||
class AudioStream {
|
||||
public:
|
||||
|
@ -8,5 +7,3 @@ public:
|
|||
virtual int getChannelCount() = 0;
|
||||
virtual bool getNextSample(float &sample) = 0;
|
||||
};
|
||||
|
||||
#endif //LIPSYNC_AUDIOSTREAM_H
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#ifndef LIPSYNC_CHANNELDOWNMIXER_H
|
||||
#define LIPSYNC_CHANNELDOWNMIXER_H
|
||||
#pragma once
|
||||
|
||||
#include "AudioStream.h"
|
||||
#include <memory>
|
||||
|
@ -17,5 +16,3 @@ private:
|
|||
std::unique_ptr<AudioStream> inputStream;
|
||||
int inputChannelCount;
|
||||
};
|
||||
|
||||
#endif //LIPSYNC_CHANNELDOWNMIXER_H
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#ifndef LIPSYNC_SAMPLERATECONVERTER_H
|
||||
#define LIPSYNC_SAMPLERATECONVERTER_H
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
@ -30,5 +29,3 @@ private:
|
|||
float mean(double start, double end);
|
||||
float getInputSample(int sampleIndex);
|
||||
};
|
||||
|
||||
#endif //LIPSYNC_SAMPLERATECONVERTER_H
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#ifndef LIPSYNC_WAVFILEREADER_H
|
||||
#define LIPSYNC_WAVFILEREADER_H
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
|
@ -31,5 +30,3 @@ private:
|
|||
int channelCount;
|
||||
int remainingSamples;
|
||||
};
|
||||
|
||||
#endif //LIPSYNC_WAVFILEREADER_H
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#ifndef LIPSYNC_IOTOOLS_H
|
||||
#define LIPSYNC_IOTOOLS_H
|
||||
#pragma once
|
||||
|
||||
#include <fstream>
|
||||
|
||||
|
@ -40,5 +39,3 @@ namespace little_endian {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
#endif //LIPSYNC_IOTOOLS_H
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
#ifndef LIPSYNC_WAVEFILEWRITER_H
|
||||
#define LIPSYNC_WAVEFILEWRITER_H
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "AudioStream.h"
|
||||
|
||||
void createWaveFile(std::unique_ptr<AudioStream> inputStream, std::string fileName);
|
||||
|
||||
#endif //LIPSYNC_WAVEFILEWRITER_H
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
#ifndef LIPSYNC_CENTISECONDS_H
|
||||
#define LIPSYNC_CENTISECONDS_H
|
||||
#pragma once
|
||||
|
||||
#include <chrono>
|
||||
|
||||
typedef std::chrono::duration<int, std::centi> centiseconds;
|
||||
|
||||
std::ostream& operator <<(std::ostream& stream, const centiseconds cs);
|
||||
|
||||
#endif //LIPSYNC_CENTISECONDS_H
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#ifndef LIPSYNC_MOUTH_ANIMATION_H
|
||||
#define LIPSYNC_MOUTH_ANIMATION_H
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include "Phone.h"
|
||||
|
@ -7,5 +6,3 @@
|
|||
#include "Shape.h"
|
||||
|
||||
std::map<centiseconds, Shape> animate(const std::map<centiseconds, Phone>& phones);
|
||||
|
||||
#endif //LIPSYNC_MOUTH_ANIMATION_H
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#ifndef LIPSYNC_PHONE_EXTRACTION_H
|
||||
#define LIPSYNC_PHONE_EXTRACTION_H
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <chrono>
|
||||
|
@ -10,5 +9,3 @@
|
|||
#include "centiseconds.h"
|
||||
|
||||
std::map<centiseconds, Phone> detectPhones(std::unique_ptr<AudioStream> audioStream);
|
||||
|
||||
#endif //LIPSYNC_PHONE_EXTRACTION_H
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
#ifndef LIPSYNC_PLATFORM_TOOLS_H
|
||||
#define LIPSYNC_PLATFORM_TOOLS_H
|
||||
#pragma once
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
boost::filesystem::path getBinPath();
|
||||
boost::filesystem::path getBinDirectory();
|
||||
|
||||
#endif //LIPSYNC_PLATFORM_TOOLS_H
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#ifndef RHUBARB_LIP_SYNC_STRING_TOOLS_H
|
||||
#define RHUBARB_LIP_SYNC_STRING_TOOLS_H
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -9,5 +8,3 @@ std::vector<std::string> splitIntoLines(const std::string& s);
|
|||
std::vector<std::string> wrapSingleLineString(const std::string& s, int lineLength);
|
||||
|
||||
std::vector<std::string> wrapString(const std::string& s, int lineLength);
|
||||
|
||||
#endif //RHUBARB_LIP_SYNC_STRING_TOOLS_H
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#ifndef LIPSYNC_TOOLS_H
|
||||
#define LIPSYNC_TOOLS_H
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
@ -35,5 +34,3 @@ final_act<F> finally(const F &f) noexcept { return final_act<F>(f); }
|
|||
|
||||
template <class F>
|
||||
final_act<F> finally(F &&f) noexcept { return final_act<F>(std::forward<F>(f)); }
|
||||
|
||||
#endif //LIPSYNC_TOOLS_H
|
||||
|
|
Loading…
Reference in New Issue