Replace use of 'typedef' by 'using'

Issue #5227
This commit is contained in:
Norman Feske
2024-06-28 17:20:59 +02:00
parent 361557e1f0
commit 19c13877ca
442 changed files with 1306 additions and 1349 deletions

View File

@ -26,7 +26,7 @@ namespace Block {
*
* \deprecated use block_number_t instead
*/
typedef Genode::uint64_t sector_t;
using sector_t = Genode::uint64_t;
class Packet_descriptor;
struct Session;
@ -55,7 +55,7 @@ class Block::Packet_descriptor : public Genode::Packet_descriptor
*/
enum Alignment { PACKET_ALIGNMENT = 11 };
typedef Request::Tag Tag;
using Tag = Request::Tag;
/**
* Payload location within the packet stream
@ -161,13 +161,13 @@ struct Block::Session : public Genode::Session
{
enum { TX_QUEUE_SIZE = 256 };
typedef Genode::Packet_stream_policy<Block::Packet_descriptor,
TX_QUEUE_SIZE, TX_QUEUE_SIZE,
char> Tx_policy;
using Tx_policy = Genode::Packet_stream_policy<Block::Packet_descriptor,
TX_QUEUE_SIZE, TX_QUEUE_SIZE,
char>;
typedef Packet_stream_tx::Channel<Tx_policy> Tx;
using Tx = Packet_stream_tx::Channel<Tx_policy>;
typedef Request::Tag Tag;
using Tag = Request::Tag;
struct Info
{

View File

@ -17,6 +17,6 @@
#include <base/capability.h>
#include <block_session/block_session.h>
namespace Block { typedef Genode::Capability<Session> Session_capability; }
namespace Block { using Session_capability = Genode::Capability<Session>; }
#endif /* _INCLUDE__BLOCK_SESSION__CAPABILITY_H_ */

View File

@ -44,7 +44,7 @@ struct Block::Connection : Genode::Connection<Session>, Session_client
class Job;
typedef Genode::size_t size_t;
using size_t = Genode::size_t;
private:
@ -53,14 +53,14 @@ struct Block::Connection : Genode::Connection<Session>, Session_client
* template argument but falls back to 'Job' if no template argument
* is given.
*/
template <typename T, typename> struct Fallback { typedef T Type; };
template <typename FB> struct Fallback<void, FB> { typedef FB Type; };
template <typename T, typename> struct Fallback { using Type = T; };
template <typename FB> struct Fallback<void, FB> { using Type = FB; };
typedef typename Fallback<JOB, Job>::Type _JOB;
using _JOB = typename Fallback<JOB, Job>::Type;
typedef Genode::Id_space<_JOB> Tag_id_space;
using Tag_id_space = Genode::Id_space<_JOB>;
typedef Packet_descriptor::Payload Payload;
using Payload = Packet_descriptor::Payload;
public: