10000 adding noexcept to move constructors · RobLoach/raylib-cpp@1917faf · GitHub
[go: up one dir, main page]

Skip to content

Commit 1917faf

Browse files
committed
adding noexcept to move constructors
1 parent cffed16 commit 1917faf

File tree

11 files changed

+13
-13
lines changed

11 files changed

+13
-13
lines changed

include/AutomationEventList.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class AutomationEventList : public ::AutomationEventList {
3131

3232
AutomationEventList(const AutomationEventList&) = delete;
3333

34-
AutomationEventList(AutomationEventList&& other) {
34+
AutomationEventList(AutomationEventList&& other) noexcept {
3535
set(other);
3636

3737
other.capacity = 0;

include/Font.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class Font : public ::Font {
8484

8585
Font(const Font&) = delete;
8686

87-
Font(Font&& other) {
87+
Font(Font&& other) noexcept {
8888
set(other);
8989

9090
other.baseSize = 0;

include/Image.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class Image : public ::Image {
9090

9191
Image(const Image& other) { set(other.Copy()); }
9292

93-
Image(Image&& other) {
93+
Image(Image&& other) noexcept {
9494
set(other);
9595

9696
other.data = nullptr;

include/Material.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Material : public ::Material {
2222

2323
Material(const Material&) = delete;
2424

25-
Material(Material&& other) {
25+
Material(Material&& other) noexcept {
2626
set(other);
2727

2828
other.maps = nullptr;

include/Mesh.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class Mesh : public MeshUnmanaged {
3535
/**
3636
* Move constructor.
3737
*/
38-
Mesh(Mesh&& other) {
38+
Mesh(Mesh&& other) noexcept {
3939
set(other);
4040

4141
other.vertexCount = 0;

include/Model.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class Model : public ::Model {
5050

5151
Model(const Model&) = delete;
5252

53-
Model(Model&& other) {
53+
Model(Model&& other) noexcept {
5454
set(other);
5555

5656
other.meshCount = 0;

include/ModelAnimation.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ModelAnimation : public ::ModelAnimation {
1818

1919
ModelAnimation(const ModelAnimation&) = delete;
2020

21-
ModelAnimation(ModelAnimation&& other) {
21+
ModelAnimation(ModelAnimation&& other) noexcept {
2222
set(other);
2323

2424
other.boneCount = 0;

include/Music.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Music : public ::Music {
3939

4040
Music(const Music&) = delete;
4141

42-
Music(Music&& other) {
42+
Music(Music&& other) noexcept {
4343
set(other);
4444

4545
other.stream = {};
@@ -169,12 +169,12 @@ class Music : public ::Music {
169169
/**
170170
* Get music time length (in seconds)
171171
*/
172-
float GetTimeLength() const { return ::GetMusicTimeLength(*this); }
172+
[[nodiscard]] float GetTimeLength() const { return ::GetMusicTimeLength(*this); }
173173

174174
/**
175175
* Get current music time played (in seconds)
176176
*/
177-
float GetTimePlayed() const { return ::GetMusicTimePlayed(*this); }
177+
[[nodiscard]] float GetTimePlayed() const { return ::GetMusicTimePlayed(*this); }
178178

179179
/**
180180
* Load music stream from file

include/Shader.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Shader : public ShaderUnmanaged {
1818

1919
Shader(const Shader&) = delete;
2020

21-
Shader(Shader&& other) {
21+
Shader(Shader&& other) noexcept {
2222
set(other);
2323

2424
other.id = 0;

include/Sound.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Sound : public ::Sound {
3030
// Nothing.
3131
}
3232

33-
Sound(Sound&& other) {
33+
Sound(Sound&& other) noexcept {
3434
set(other);
3535

3636
other.stream = {nullptr, nullptr, 0, 0, 0};

include/Wave.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Wave : public ::Wave {
4343

4444
Wave(const Wave& other) { set(other.Copy()); }
4545

46-
Wave(Wave&& other) {
46+
Wave(Wave&& other) noexcept {
4747
set(other);
4848

4949
other.frameCount = 0;

0 commit comments

Comments
 (0)
0