Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35807bfc authored by Myles Watson's avatar Myles Watson
Browse files

Module: Mark getters as const

Test: bluetooth_test_gd
Change-Id: Ieea21b113154bac1539a1ff73f4ca46ad37dfe35
parent bb2557f0
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -24,12 +24,12 @@ namespace bluetooth {
ModuleFactory::ModuleFactory(std::function<Module*()> ctor) : ctor_(ctor) {
ModuleFactory::ModuleFactory(std::function<Module*()> ctor) : ctor_(ctor) {
}
}


Handler* Module::GetHandler() {
Handler* Module::GetHandler() const {
  ASSERT_LOG(handler_ != nullptr, "Can't get handler when it's not started");
  ASSERT_LOG(handler_ != nullptr, "Can't get handler when it's not started");
  return handler_;
  return handler_;
}
}


const ModuleRegistry* Module::GetModuleRegistry() {
const ModuleRegistry* Module::GetModuleRegistry() const {
  return registry_;
  return registry_;
}
}


+2 −2
Original line number Original line Diff line number Diff line
@@ -77,9 +77,9 @@ class Module {
  // Release all resources, you're about to be deleted
  // Release all resources, you're about to be deleted
  virtual void Stop() = 0;
  virtual void Stop() = 0;


  ::bluetooth::os::Handler* GetHandler();
  ::bluetooth::os::Handler* GetHandler() const;


  const ModuleRegistry* GetModuleRegistry();
  const ModuleRegistry* GetModuleRegistry() const;


  template <class T>
  template <class T>
  T* GetDependency() const {
  T* GetDependency() const {