Skip to content

Commit

Permalink
Add some std::decay
Browse files Browse the repository at this point in the history
  • Loading branch information
gansm committed Aug 3, 2023
1 parent c3bd786 commit cf231ce
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 16 deletions.
6 changes: 0 additions & 6 deletions final/eventloop/eventloop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ auto EventLoop::run() -> int
return 0;
}

//----------------------------------------------------------------------
void EventLoop::leave()
{
running = false;
}


// private methods of EventLoop
//----------------------------------------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions final/eventloop/eventloop.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ class EventLoop
friend class Monitor;
};

// EventLoop inline functions
//----------------------------------------------------------------------
inline void EventLoop::leave()
{ running = false; }

} // namespace finalcut

#endif // EVENTLOOP_H
4 changes: 2 additions & 2 deletions final/eventloop/io_monitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ class IoMonitor final : public Monitor

// Method
void init (int, short, handler_t, void*);
auto operator=(const IoMonitor&) -> IoMonitor& = delete;
auto operator=(const IoMonitor&&) -> IoMonitor& = delete;
auto operator = (const IoMonitor&) -> IoMonitor& = delete;
auto operator = (const IoMonitor&&) -> IoMonitor& = delete;
};

} // namespace finalcut
Expand Down
2 changes: 1 addition & 1 deletion final/eventloop/posix_timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class SigAlrmHandler
{
public:
// Using-declaration
using HandlerReturnType = void (*)(int, siginfo_t*, void*);
using HandlerReturnType = std::decay<void(int, siginfo_t*, void*)>::type;

// Overloaded operators
void operator () (int, siginfo_t* signal_info, void*)
Expand Down
5 changes: 0 additions & 5 deletions final/eventloop/timer_monitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,6 @@ class TimerMonitor final : public TimerClass::type
// Disable move constructor
TimerMonitor (TimerMonitor&&) noexcept = delete;

// Constructor
explicit TimerMonitor (EventLoop* eloop)
: TimerClass::type(eloop)
{ }

// Destructor
~TimerMonitor() override;

Expand Down
5 changes: 3 additions & 2 deletions final/output/tty/ftermcap.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <array>
#include <string>
#include <thread>
#include <type_traits>
#include <utility>
#include <vector>

Expand Down Expand Up @@ -76,8 +77,8 @@ class FTermcap final

// Using-declaration
using TCapMapType = std::array<TCapMap, 85>;
using PutCharFunc = int (*)(int);
using PutStringFunc = int (*)(const std::string&);
using PutCharFunc = std::decay<int(int)>::type;
using PutStringFunc = std::decay<int(const std::string&)>::type;

// Constructors
FTermcap() = default;
Expand Down

0 comments on commit cf231ce

Please sign in to comment.