genode/repos/base/src/core
Norman Feske 6b289a1423 base/core: use references instead of pointers
This patch replaces the former prominent use of pointers by references
wherever feasible. This has the following benefits:

* The contract between caller and callee becomes more obvious. When
  passing a reference, the contract says that the argument cannot be
  a null pointer. The caller is responsible to ensure that. Therefore,
  the use of reference eliminates the need to add defensive null-pointer
  checks at the callee site, which sometimes merely exist to be on the
  safe side. The bottom line is that the code becomes easier to follow.

* Reference members must be initialized via an object initializer,
  which promotes a programming style that avoids intermediate object-
  construction states. Within core, there are still a few pointers
  as member variables left though. E.g., caused by the late association
  of 'Platform_thread' objects with their 'Platform_pd' objects.

* If no pointers are present as member variables, we don't need to
  manually provide declarations of a private copy constructor and
  an assignment operator to avoid -Weffc++ errors "class ... has
  pointer data members [-Werror=effc++]".

This patch also changes a few system bindings on NOVA and Fiasco.OC,
e.g., the return value of the global 'cap_map' accessor has become a
reference. Hence, the patch touches a few places outside of core.

Fixes #3135
2019-02-12 10:33:13 +01:00
..
include base/core: use references instead of pointers 2019-02-12 10:33:13 +01:00
spec/x86 base/core: use references instead of pointers 2019-02-12 10:33:13 +01:00
capability_space.cc core: add Platform::max_caps() 2017-05-31 13:16:03 +02:00
core_log.cc core: add support to export log output as ROM 2017-12-21 15:01:46 +01:00
core_mem_alloc.cc Follow practices suggested by "Effective C++" 2018-01-17 12:14:35 +01:00
core_region_map.cc base: support to attach RAM dataspaces readonly 2018-05-30 13:36:27 +02:00
core_rpc_cap_alloc.cc base/core: use references instead of pointers 2019-02-12 10:33:13 +01:00
cpu_session_component.cc base/core: use references instead of pointers 2019-02-12 10:33:13 +01:00
cpu_session_support.cc Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
cpu_thread_component.cc base/core: use references instead of pointers 2019-02-12 10:33:13 +01:00
dataspace_component.cc base/core: use references instead of pointers 2019-02-12 10:33:13 +01:00
default_log.cc base: move 'Buffered_output' class into public header 2019-01-30 13:49:55 +01:00
dump_alloc.cc core: improve formatting of allocator dumps 2017-03-24 16:19:58 +01:00
heartbeat.cc init: health monitoring of child components 2018-11-27 11:36:34 +01:00
io_mem_session_component.cc base/core: use references instead of pointers 2019-02-12 10:33:13 +01:00
main.cc base/core: use references instead of pointers 2019-02-12 10:33:13 +01:00
pager_ep.cc base/core: use references instead of pointers 2019-02-12 10:33:13 +01:00
pager_object.cc Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
pd_session_component.cc Follow practices suggested by "Effective C++" 2018-01-17 12:14:35 +01:00
pd_session_support.cc core: add map method to pd_session interface 2017-08-18 10:24:46 +02:00
platform_rom_modules.cc base/core: use references instead of pointers 2019-02-12 10:33:13 +01:00
platform_services.cc base/core: use references instead of pointers 2019-02-12 10:33:13 +01:00
ram_dataspace_factory.cc base/core: use references instead of pointers 2019-02-12 10:33:13 +01:00
region_map_component.cc base/core: use references instead of pointers 2019-02-12 10:33:13 +01:00
rom_session_component.cc base/core: use references instead of pointers 2019-02-12 10:33:13 +01:00
rpc_cap_factory_l4.cc base/core: use references instead of pointers 2019-02-12 10:33:13 +01:00
rpc_cap_factory.cc Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
signal_receiver.cc core-linux: avoid block-for-signal assertion 2017-08-28 16:49:41 +02:00
signal_source_component.cc base/core: use references instead of pointers 2019-02-12 10:33:13 +01:00
signal_transmitter_noinit.cc core: use separate signal ep 2017-11-30 11:23:11 +01:00
signal_transmitter_proxy.cc core: use separate signal ep 2017-11-30 11:23:11 +01:00
stack_area.cc base/core: use references instead of pointers 2019-02-12 10:33:13 +01:00
target.inc mk: strip binaries at <build-dir>/bin/ 2017-05-02 15:29:03 +02:00
trace_session_component.cc base/core: use references instead of pointers 2019-02-12 10:33:13 +01:00
version.cc Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
version.inc core: avoid using BASE_DIR in vpath 2017-05-02 15:29:03 +02:00