Skip to content

Commit

Permalink
fixup! [ui] Add support for a custom allocator to modm::ViewStack
Browse files Browse the repository at this point in the history
  • Loading branch information
salkinium authored and MatthewMArnold committed Jul 20, 2024
1 parent 667d67d commit 0d5bd59
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/modm/ui/menu/abstract_menu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace modm{
* \author Thorsten Lajewski
* \ingroup modm_ui_menu
*/
template<typename Allocator = allocator::Dynamic<IAbstractView> >
template<typename Allocator = std::allocator<IAbstractView> >
class AbstractMenu : public AbstractView<Allocator>
{
public:
Expand Down
4 changes: 2 additions & 2 deletions src/modm/ui/menu/abstract_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#ifndef MODM_ABSTRACT_VIEW_HPP
#define MODM_ABSTRACT_VIEW_HPP

#include <modm/utils/allocator.hpp>
#include <memory>

#include "iabstract_view.hpp"

Expand All @@ -36,7 +36,7 @@ namespace modm
*\ingroup modm_ui_menu
*/

template<typename Allocator = allocator::Dynamic<IAbstractView> >
template<typename Allocator = std::allocator<IAbstractView> >
class AbstractView : public IAbstractView
{
template<typename T>
Expand Down
2 changes: 1 addition & 1 deletion src/modm/ui/menu/choice_menu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace modm{
* \ingroup modm_ui_menu
*
*/
template<typename Allocator = allocator::Dynamic<IAbstractView> >
template<typename Allocator = std::allocator<IAbstractView> >
class ChoiceMenu : public AbstractMenu<Allocator>
{
public:
Expand Down
2 changes: 1 addition & 1 deletion src/modm/ui/menu/communicating_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
namespace modm
{
/// @ingroup modm_ui_menu
template<typename Allocator = allocator::Dynamic<IAbstractView> >
template<typename Allocator = std::allocator<IAbstractView> >
class CommunicatingView : public xpcc::Communicatable
{
public:
Expand Down
2 changes: 1 addition & 1 deletion src/modm/ui/menu/communicating_view_stack.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
namespace modm
{
/// @ingroup modm_ui_menu
template<typename Allocator = allocator::Dynamic<IAbstractView> >
template<typename Allocator = std::allocator<IAbstractView> >
class CommunicatingViewStack : public ViewStack<Allocator>
{
public:
Expand Down
2 changes: 1 addition & 1 deletion src/modm/ui/menu/menu_entry_callback.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
namespace modm
{
/// @ingroup modm_ui_menu
template<typename Allocator = allocator::Dynamic<IAbstractView> >
template<typename Allocator = std::allocator<IAbstractView> >
class MenuEntryCallback
{
public:
Expand Down
3 changes: 1 addition & 2 deletions src/modm/ui/menu/module.lb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ def prepare(module, options):
":communication:xpcc",
":container",
":processing:timer",
":ui:display",
":utils")
":ui:display")
return True

def build(env):
Expand Down
4 changes: 2 additions & 2 deletions src/modm/ui/menu/standard_menu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace modm
* \ingroup modm_ui_menu
* \author Thorsten Lajewski
*/
template<typename Allocator = allocator::Dynamic<IAbstractView> >
template<typename Allocator = std::allocator<IAbstractView> >
struct MenuEntry
{
/**
Expand Down Expand Up @@ -63,7 +63,7 @@ namespace modm
* \author Thorsten Lajewski
*/

template<typename Allocator = allocator::Dynamic<IAbstractView> >
template<typename Allocator = std::allocator<IAbstractView> >
class StandardMenu : public AbstractMenu<Allocator>
{
public:
Expand Down
2 changes: 1 addition & 1 deletion src/modm/ui/menu/view_stack.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace modm
* \author Thorsten Lajewski
*/

template<typename Allocator = allocator::Dynamic<IAbstractView> >
template<typename Allocator = std::allocator<IAbstractView> >
class ViewStack
{
public:
Expand Down

0 comments on commit 0d5bd59

Please sign in to comment.