aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-01 17:27:14 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-01 17:27:14 +0200
commit65eda52aa51017f6f7aad158c4f8b6e91054cf0d (patch)
treea668f9374ef61a502bf691e3b13510d1dc9efca9 /src/crepe/api
parent8e67adc6828181b1df7c95da76f32962444fc7fd (diff)
`make format`
Diffstat (limited to 'src/crepe/api')
-rw-r--r--src/crepe/api/AudioSource.cpp5
-rw-r--r--src/crepe/api/AudioSource.h3
-rw-r--r--src/crepe/api/Component.h3
-rw-r--r--src/crepe/api/Resource.cpp9
-rw-r--r--src/crepe/api/Resource.h5
5 files changed, 7 insertions, 18 deletions
diff --git a/src/crepe/api/AudioSource.cpp b/src/crepe/api/AudioSource.cpp
index cbde79f..4d1b093 100644
--- a/src/crepe/api/AudioSource.cpp
+++ b/src/crepe/api/AudioSource.cpp
@@ -9,9 +9,7 @@ AudioSource::AudioSource(std::unique_ptr<Resource> audio_clip) {
this->_sound = std::make_unique<crepe::Sound>(std::move(audio_clip));
}
-void AudioSource::play() {
- return this->play(false);
-}
+void AudioSource::play() { return this->play(false); }
void AudioSource::play(bool looping) {
this->_sound->set_looping(looping);
@@ -22,4 +20,3 @@ void AudioSource::stop() {
this->_sound->pause();
this->_sound->rewind();
}
-
diff --git a/src/crepe/api/AudioSource.h b/src/crepe/api/AudioSource.h
index 6a038be..4300c48 100644
--- a/src/crepe/api/AudioSource.h
+++ b/src/crepe/api/AudioSource.h
@@ -38,5 +38,4 @@ private:
std::unique_ptr<crepe::Sound> _sound;
};
-}
-
+} // namespace crepe::api
diff --git a/src/crepe/api/Component.h b/src/crepe/api/Component.h
index 2abb461..d5e0499 100644
--- a/src/crepe/api/Component.h
+++ b/src/crepe/api/Component.h
@@ -7,5 +7,4 @@ public:
bool active;
};
-}
-
+} // namespace crepe::api
diff --git a/src/crepe/api/Resource.cpp b/src/crepe/api/Resource.cpp
index 6bb081d..1a647ce 100644
--- a/src/crepe/api/Resource.cpp
+++ b/src/crepe/api/Resource.cpp
@@ -9,11 +9,6 @@ Resource::Resource(const std::string & src) {
this->file = std::ifstream(this->src, std::ios::in | std::ios::binary);
}
-const std::istream & Resource::read() {
- return this->file;
-}
-
-const char * Resource::canonical() {
- return this->src.c_str();
-}
+const std::istream & Resource::read() { return this->file; }
+const char * Resource::canonical() { return this->src.c_str(); }
diff --git a/src/crepe/api/Resource.h b/src/crepe/api/Resource.h
index 2b62ff9..f2b2a0e 100644
--- a/src/crepe/api/Resource.h
+++ b/src/crepe/api/Resource.h
@@ -1,8 +1,8 @@
#pragma once
-#include <string>
#include <fstream>
#include <iostream>
+#include <string>
namespace crepe::api {
@@ -21,5 +21,4 @@ private:
std::ifstream file;
};
-}
-
+} // namespace crepe::api