Skip to content

Commit 3dfe0d7

Browse files
authored
Clean up semicolon usage
Cleaned inconsistent use of semicolons after constexpr function statements
1 parent 65f3327 commit 3dfe0d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/cpp/constexpr-cpp.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ constexpr float exp(float x, int n)
8585
return n == 0 ? 1 :
8686
n % 2 == 0 ? exp(x * x, n / 2) :
8787
exp(x * x, (n - 1) / 2) * x;
88-
};
88+
}
8989
```
9090

9191
> [!TIP]
@@ -112,15 +112,15 @@ constexpr float exp(float x, int n)
112112
return n == 0 ? 1 :
113113
n % 2 == 0 ? exp(x * x, n / 2) :
114114
exp(x * x, (n - 1) / 2) * x;
115-
};
115+
}
116116

117117
// Pass by reference
118118
constexpr float exp2(const float& x, const int& n)
119119
{
120120
return n == 0 ? 1 :
121121
n % 2 == 0 ? exp2(x * x, n / 2) :
122122
exp2(x * x, (n - 1) / 2) * x;
123-
};
123+
}
124124

125125
// Compile-time computation of array length
126126
template<typename T, int N>

0 commit comments

Comments
 (0)