Skip to content

Commit

Permalink
Added noexcept to some functions (useless though)
Browse files Browse the repository at this point in the history
  • Loading branch information
ioan-chera committed Oct 8, 2023
1 parent 9e8a3df commit 43a6d78
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Document.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct Document
{
return static_cast<int>(things.size());
}
int numVertices() const
int numVertices() const noexcept
{
return static_cast<int>(vertices.size());
}
Expand Down
2 changes: 1 addition & 1 deletion src/Instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class Instance
const Sector *front, const Sector *back) const;

// E_MAIN
void CalculateLevelBounds();
void CalculateLevelBounds() noexcept;
void Editor_ChangeMode(char mode_char);
void Editor_ChangeMode_Raw(ObjType new_mode);
void Editor_ClearAction();
Expand Down
6 changes: 3 additions & 3 deletions src/Vertex.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ struct Vertex

enum { F_X, F_Y };

inline double x() const
inline double x() const noexcept
{
return static_cast<double>(raw_x);
}
inline double y() const
inline double y() const noexcept
{
return static_cast<double>(raw_y);
}
inline v2double_t xy() const
inline v2double_t xy() const noexcept
{
return { x(), y() };
}
Expand Down
4 changes: 2 additions & 2 deletions src/e_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ void Instance::Editor_ChangeMode(char mode_char)
//------------------------------------------------------------------------


static void UpdateLevelBounds(Instance &inst, int start_vert)
static void UpdateLevelBounds(Instance &inst, int start_vert) noexcept
{
for(int i = start_vert; i < inst.level.numVertices(); i++)
{
Expand All @@ -387,7 +387,7 @@ static void UpdateLevelBounds(Instance &inst, int start_vert)
}
}

void Instance::CalculateLevelBounds()
void Instance::CalculateLevelBounds() noexcept
{
if (level.numVertices() == 0)
{
Expand Down

0 comments on commit 43a6d78

Please sign in to comment.