Skip to content

Commit

Permalink
Shell: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Sep 7, 2019
1 parent 05bf3f9 commit 3bf7e70
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion doomsday/tools/dshell/src/aboutdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ AboutDialog::AboutDialog()
rule().setSize(Const(40), label->rule().height());
}

bool AboutDialog::handleEvent(Event const &event)
bool AboutDialog::handleEvent(const Event &event)
{
if (event.type() == Event::KeyPress)
{
Expand Down
2 changes: 1 addition & 1 deletion doomsday/tools/dshell/src/aboutdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class AboutDialog : public de::term::DialogWidget
public:
AboutDialog();

bool handleEvent(de::Event const &event);
bool handleEvent(const de::Event &event);
};

#endif // ABOUTDIALOG_H
4 changes: 2 additions & 2 deletions doomsday/tools/dshell/src/cursesapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static void windowResized(int)
ungetch(KEY_RESIZE);
}

static String runSystemCommand(char const *cmd)
static String runSystemCommand(const char *cmd)
{
String result;
FILE *p = popen(cmd, "r");
Expand All @@ -63,7 +63,7 @@ static String runSystemCommand(char const *cmd)
*
* @return Terminal columns and rows.
*/
static Vec2ui actualTerminalSize(Vec2ui const &oldSize)
static Vec2ui actualTerminalSize(const Vec2ui &oldSize)
{
Vec2ui size = oldSize;
const auto result = runSystemCommand("stty size");
Expand Down
4 changes: 2 additions & 2 deletions doomsday/tools/dshell/src/cursestextcanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ DE_PIMPL_NOREF(CursesTextCanvas)
Coord origin;
Vec2i cursorPos;

Impl(WINDOW *window, Coord const &originInWindow)
Impl(WINDOW *window, const Coord &originInWindow)
: window(window), origin(originInWindow)
{}
};

CursesTextCanvas::CursesTextCanvas(Size const &size, WINDOW *window, Coord const &originInWindow)
CursesTextCanvas::CursesTextCanvas(const Size &size, WINDOW *window, const Coord &originInWindow)
: TextCanvas(size), d(new Impl(window, originInWindow))
{}

Expand Down
4 changes: 2 additions & 2 deletions doomsday/tools/dshell/src/cursestextcanvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
class CursesTextCanvas : public de::term::TextCanvas
{
public:
CursesTextCanvas(Size const &size, WINDOW *window, Coord const &originInWindow = Coord(0, 0));
CursesTextCanvas(const Size &size, WINDOW *window, const Coord &originInWindow = Coord(0, 0));

void setCursorPosition(de::Vec2i const &pos);
void setCursorPosition(const de::Vec2i &pos);

void show();

Expand Down
2 changes: 1 addition & 1 deletion doomsday/tools/dshell/src/openconnectiondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

using namespace de;

OpenConnectionDialog::OpenConnectionDialog(String const &name) : term::InputDialogWidget(name)
OpenConnectionDialog::OpenConnectionDialog(const String &name) : term::InputDialogWidget(name)
{
setDescription("Enter the address of the server you want to connect to. "
"The address can be a domain name or an IP address. "
Expand Down
2 changes: 1 addition & 1 deletion doomsday/tools/dshell/src/openconnectiondialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
class OpenConnectionDialog : public de::term::InputDialogWidget
{
public:
OpenConnectionDialog(de::String const &name = {});
OpenConnectionDialog(const de::String &name = {});

/**
* Returns the address that the user entered in the dialog. If the dialog
Expand Down
2 changes: 1 addition & 1 deletion doomsday/tools/dshell/src/shellapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ ShellApp::~ShellApp()
LogBuffer::get().removeSink(d->log->logSink());
}

void ShellApp::openConnection(String const &address)
void ShellApp::openConnection(const String &address)
{
closeConnection();

Expand Down
2 changes: 1 addition & 1 deletion doomsday/tools/dshell/src/shellapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ShellApp : public CursesApp

~ShellApp();

void openConnection(de::String const &address);
void openConnection(const de::String &address);

void showAbout();
void askToOpenConnection();
Expand Down
4 changes: 2 additions & 2 deletions doomsday/tools/dshell/src/statuswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ DE_PIMPL(StatusWidget)
}
};

StatusWidget::StatusWidget(String const &name)
StatusWidget::StatusWidget(const String &name)
: Widget(name), d(new Impl(this))
{
d->updateTimer += [this]() { d->refresh(); };
Expand All @@ -68,7 +68,7 @@ void StatusWidget::setShellLink(network::Link *link)
root().requestDraw();
}

void StatusWidget::setGameState(String const &mode, String const &rules, String const &mapId)
void StatusWidget::setGameState(const String &mode, const String &rules, const String &mapId)
{
d->gameMode = mode;
d->rules = rules;
Expand Down
4 changes: 2 additions & 2 deletions doomsday/tools/dshell/src/statuswidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
class StatusWidget : public de::term::Widget
{
public:
StatusWidget(de::String const &name = de::String());
StatusWidget(const de::String &name = de::String());

/**
* Sets the shell Link whose status is to be shown on screen.
Expand All @@ -34,7 +34,7 @@ class StatusWidget : public de::term::Widget
*/
void setShellLink(network::Link *link);

void setGameState(de::String const &mode, de::String const &rules, de::String const &mapId);
void setGameState(const de::String &mode, const de::String &rules, const de::String &mapId);

void draw();

Expand Down

0 comments on commit 3bf7e70

Please sign in to comment.