Skip to content

Commit 813f08e

Browse files
committed
Remove template from constructor
Try to fix stop_token again
1 parent 7577e23 commit 813f08e

File tree

7 files changed

+27
-25
lines changed

7 files changed

+27
-25
lines changed

3rdparty/stop_token.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ class [[nodiscard]] stop_callback : private ___stop_callback_base {
496496
// requires Constructible<Callback, C>
497497
explicit stop_callback(const stop_token& __token, _CB&& __cb) noexcept(
498498
std::is_nothrow_constructible_v<_Callback, _CB>)
499-
: __stop_callback_base{[](__stop_callback_base *__that) noexcept {
499+
: ___stop_callback_base{[](___stop_callback_base *__that) noexcept {
500500
static_cast<stop_callback*>(__that)->__execute();
501501
}},
502502
__state_(nullptr),
@@ -553,7 +553,7 @@ class [[nodiscard]] stop_callback : private ___stop_callback_base {
553553
#endif
554554
}
555555

556-
__stop_state* __state_;
556+
___stop_state* __state_;
557557
_Callback __cb_;
558558
#ifdef SAFE
559559
std::atomic<bool> __inExecute_{false};

source/Logger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
#include <iomanip>
3939
#include <iostream> // std::streambuf, std::cout
4040
#include <source_location.hpp>
41+
#include <sstream>
4142
#include <string>
4243
#include <string_view>
43-
#include <sstream>
4444

4545
/* magic enum */
4646
#include <magic_enum.hpp>

source/StringUtils.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ namespace vx::string_utils {
7070
std::string_view _trim ) noexcept {
7171

7272
auto trimmed_ = [ &_trim ]( auto _chr ) {
73+
7374
if ( !_trim.empty() ) {
7475

7576
return _trim.find( _chr ) != std::string_view::npos;
@@ -85,6 +86,7 @@ namespace vx::string_utils {
8586
std::string_view _trim ) noexcept {
8687

8788
auto trimmed_ = [ &_trim ]( auto _chr ) {
89+
8890
if ( !_trim.empty() ) {
8991

9092
return _trim.find( _chr ) != std::string_view::npos;

source/templates/Line.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ namespace vx {
5858
/**
5959
* @brief Default constructor for Line.
6060
*/
61-
constexpr Line<T>() = default;
61+
constexpr Line() = default;
6262

6363
/**
6464
* @brief Constructor for Line
6565
* @param _point1 First point.
6666
* @param _point2 Second point.
6767
*/
68-
constexpr Line<T>( Point<T> _point1,
69-
Point<T> _point2 ) noexcept
68+
constexpr Line( Point<T> _point1,
69+
Point<T> _point2 ) noexcept
7070
: m_point1( _point1 ),
7171
m_point2( _point2 ) {}
7272

@@ -77,10 +77,10 @@ namespace vx {
7777
* @param _x2 X of second point.
7878
* @param _y2 Y of second point.
7979
*/
80-
constexpr Line<T>( T _x1,
81-
T _y1,
82-
T _x2,
83-
T _y2 ) noexcept
80+
constexpr Line( T _x1,
81+
T _y1,
82+
T _x2,
83+
T _y2 ) noexcept
8484
: m_point1( Point<T>( _x1, _y1 ) ),
8585
m_point2( Point<T>( _x2, _y2 ) ) {}
8686

source/templates/Point.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ namespace vx {
5858
/**
5959
* @brief Default constructor for Point.
6060
*/
61-
constexpr Point<T>() = default;
61+
constexpr Point() = default;
6262

6363
/**
6464
* @brief Constructor for Point.
6565
* @param _x X value.
6666
* @param _y Y value.
6767
*/
68-
constexpr Point<T>( T _x,
69-
T _y ) noexcept
68+
constexpr Point( T _x,
69+
T _y ) noexcept
7070
: m_x( _x ),
7171
m_y( _y ) {}
7272

source/templates/Rect.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ namespace vx {
5858
/**
5959
* @brief Default constructor for Rect.
6060
*/
61-
constexpr Rect<T>() = default;
61+
constexpr Rect() = default;
6262

6363
/**
6464
* @brief Constructor for Rect.
@@ -67,10 +67,10 @@ namespace vx {
6767
* @param _width Width value.
6868
* @param _height Height value.
6969
*/
70-
constexpr Rect<T>( T _left,
71-
T _top,
72-
T _width,
73-
T _height ) noexcept
70+
constexpr Rect( T _left,
71+
T _top,
72+
T _width,
73+
T _height ) noexcept
7474
: m_x1( _left ),
7575
m_y1( _top ),
7676
m_x2( _left + _width - 1 ),
@@ -81,8 +81,8 @@ namespace vx {
8181
* @param _topleft Top left point.
8282
* @param _bottomright Bottom right point.
8383
*/
84-
constexpr Rect<T>( Point<T> _topleft,
85-
Point<T> _bottomright ) noexcept
84+
constexpr Rect( Point<T> _topleft,
85+
Point<T> _bottomright ) noexcept
8686
: m_x1( _topleft.x() ),
8787
m_y1( _topleft.y() ),
8888
m_x2( _bottomright.x() ),
@@ -93,8 +93,8 @@ namespace vx {
9393
* @param _point Point value.
9494
* @param _size Size value.
9595
*/
96-
constexpr Rect<T>( Point<T> _point,
97-
Size<T> _size ) noexcept
96+
constexpr Rect( Point<T> _point,
97+
Size<T> _size ) noexcept
9898
: m_x1( _point.x() ),
9999
m_y1( _point.y() ),
100100
m_x2( _point.x() + _size.width() - 1 ),

source/templates/Size.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ namespace vx {
5757
/**
5858
* @brief Default constructor for Size.
5959
*/
60-
constexpr Size<T>() = default;
60+
constexpr Size() = default;
6161

6262
/**
6363
* @brief Constructor for Size.
6464
* @param _width Width value.
6565
* @param _height Height value.
6666
*/
67-
constexpr Size<T>( T _width,
68-
T _height ) noexcept
67+
constexpr Size( T _width,
68+
T _height ) noexcept
6969
: m_width( _width ),
7070
m_height( _height ) {}
7171

0 commit comments

Comments
 (0)