reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit 0560ce9892f7103c3706c7222ee338bb64860d1e
parent 106f80e73cb15f169797f64b5a93b717d1285b80
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Thu, 17 Mar 2016 18:24:08 -0400

mild refactoring

Diffstat:
Msrc/about.cpp | 26++++++++++++++------------
Msrc/version.cpp | 2+-
2 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/src/about.cpp b/src/about.cpp @@ -109,6 +109,7 @@ void About::onCommand(const int id) openLink(m_websiteLinks[id & 0xff]); else if(id >> 8 == IDC_DONATE) openLink(m_donationLinks[id & 0xff]); + break; } } @@ -249,22 +250,23 @@ void About::selectLink(const int ctrl, const std::vector<const Link *> &links) { const int count = (int)links.size(); - if(count > 1) { - Menu menu; + m_tabs->setFocus(); - for(int i = 0; i < count; i++) { - const string &name = boost::replace_all_copy(links[i]->name, "&", "&&"); - menu.addAction(make_autostring(name).c_str(), i | (ctrl << 8)); - } + if(count == 1) { + openLink(links.front()); + return; + } + + Menu menu; - RECT rect; - GetWindowRect(getControl(ctrl), &rect); - menu.show(rect.left, rect.bottom - 1, handle()); + for(int i = 0; i < count; i++) { + const string &name = boost::replace_all_copy(links[i]->name, "&", "&&"); + menu.addAction(make_autostring(name).c_str(), i | (ctrl << 8)); } - else if(count == 1) - openLink(links.front()); - m_tabs->setFocus(); + RECT rect; + GetWindowRect(getControl(ctrl), &rect); + menu.show(rect.left, rect.bottom - 1, handle()); } void About::openLink(const Link *link) diff --git a/src/version.cpp b/src/version.cpp @@ -72,7 +72,7 @@ Version::~Version() string Version::fullName() const { - const string fName = "v" + m_name; + const string fName = 'v' + m_name; return m_package ? m_package->fullName() + " " + fName : fName; }