Use enum class over plain enum
parent
4f87eb6658
commit
34e766498f
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
enum Type
|
||||
enum class Type
|
||||
{
|
||||
FFOLDER,
|
||||
FFILE
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
enum KeyboardTarget
|
||||
enum class KeyboardTarget
|
||||
{
|
||||
IURL,
|
||||
IUSERNAME,
|
||||
|
|
|
@ -37,7 +37,7 @@ WebDAVView::WebDAVView(const irect &contentRect, vector<WebDAVItem> &items, int
|
|||
{
|
||||
auto entrySize = TextRectHeight(contentRect.w, item.title.c_str(), 0);
|
||||
|
||||
if (item.type == IFILE)
|
||||
if (item.type == Itemtype::IFILE)
|
||||
entrySize += _entryFontHeight;
|
||||
|
||||
entrySize += (item.title.find("click to go back") != std::string::npos) ? 0.5 * _entryFontHeight : 2.5 * _entryFontHeight;
|
||||
|
|
|
@ -35,7 +35,7 @@ void WebDAVViewEntry::draw(const ifont *entryFont, const ifont *entryFontBold, i
|
|||
}
|
||||
else
|
||||
{
|
||||
if (_entry.type == IFILE)
|
||||
if (_entry.type == Itemtype::IFILE)
|
||||
{
|
||||
DrawTextRect(_position.x, _position.y + heightOfTitle, _position.w, fontHeight, _entry.fileType.c_str(), ALIGN_LEFT);
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ bool Util::connectToNetwork()
|
|||
|
||||
const char *network_name = nullptr;
|
||||
int result = NetConnect2(network_name, 1);
|
||||
if (result != 0)
|
||||
if (result)
|
||||
{
|
||||
Message(ICON_WARNING, "Warning", "It was not possible to establish an internet connection.", 2000);
|
||||
return false;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
enum Action
|
||||
enum class Action
|
||||
{
|
||||
IWriteSecret,
|
||||
IReadSecret,
|
||||
|
|
Loading…
Reference in New Issue