refactor: concatenate Namespaces
This commit is contained in:
parent
aacf922319
commit
07a217f54f
8 changed files with 16 additions and 45 deletions
|
|
@ -10,9 +10,7 @@
|
||||||
#include "arch/win32/ArchMiscWindows.h"
|
#include "arch/win32/ArchMiscWindows.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace deskflow {
|
namespace deskflow::filesystem {
|
||||||
|
|
||||||
namespace filesystem {
|
|
||||||
|
|
||||||
#ifdef SYSAPI_WIN32
|
#ifdef SYSAPI_WIN32
|
||||||
|
|
||||||
|
|
@ -36,6 +34,4 @@ std::string path(const std::string &filePath)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace filesystem
|
} // namespace deskflow::filesystem
|
||||||
|
|
||||||
} // namespace deskflow
|
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,7 @@
|
||||||
#include "common/Common.h"
|
#include "common/Common.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace deskflow {
|
namespace deskflow::filesystem {
|
||||||
|
|
||||||
namespace filesystem {
|
|
||||||
|
|
||||||
#ifdef SYSAPI_WIN32
|
#ifdef SYSAPI_WIN32
|
||||||
std::wstring path(const std::string &filePath);
|
std::wstring path(const std::string &filePath);
|
||||||
|
|
@ -19,6 +17,4 @@ std::wstring path(const std::string &filePath);
|
||||||
std::string path(const std::string &filePath);
|
std::string path(const std::string &filePath);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace filesystem
|
} // namespace deskflow::filesystem
|
||||||
|
|
||||||
} // namespace deskflow
|
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,7 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace deskflow {
|
namespace deskflow::string {
|
||||||
namespace string {
|
|
||||||
|
|
||||||
std::string format(const char *fmt, ...)
|
std::string format(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -178,5 +177,4 @@ bool CaselessCmp::cmpLess(const std::string::value_type &a, const std::string::v
|
||||||
return tolower(a) < tolower(b);
|
return tolower(a) < tolower(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace string
|
} // namespace deskflow::string
|
||||||
} // namespace deskflow
|
|
||||||
|
|
|
||||||
|
|
@ -12,13 +12,11 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace deskflow {
|
|
||||||
|
|
||||||
//! std::string utilities
|
//! std::string utilities
|
||||||
/*!
|
/*!
|
||||||
Provides functions for string manipulation.
|
Provides functions for string manipulation.
|
||||||
*/
|
*/
|
||||||
namespace string {
|
namespace deskflow::string {
|
||||||
|
|
||||||
//! Format positional arguments
|
//! Format positional arguments
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -76,5 +74,4 @@ public:
|
||||||
static bool cmpLess(const std::string::value_type &a, const std::string::value_type &b);
|
static bool cmpLess(const std::string::value_type &a, const std::string::value_type &b);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace string
|
} // namespace deskflow::string
|
||||||
} // namespace deskflow
|
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,7 @@ std::string vectorToString(const std::vector<std::string> &vector, const std::st
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
namespace deskflow {
|
namespace deskflow::languages {
|
||||||
|
|
||||||
namespace languages {
|
|
||||||
|
|
||||||
LanguageManager::LanguageManager(const std::vector<std::string> &localLanguages) : m_localLanguages(localLanguages)
|
LanguageManager::LanguageManager(const std::vector<std::string> &localLanguages) : m_localLanguages(localLanguages)
|
||||||
{
|
{
|
||||||
|
|
@ -88,6 +86,4 @@ bool LanguageManager::isLanguageInstalled(const std::string &language) const
|
||||||
return isInstalled;
|
return isInstalled;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace languages
|
} // namespace deskflow::languages
|
||||||
|
|
||||||
} // namespace deskflow
|
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,7 @@
|
||||||
#include "deskflow/AppUtil.h"
|
#include "deskflow/AppUtil.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace deskflow {
|
namespace deskflow::languages {
|
||||||
|
|
||||||
namespace languages {
|
|
||||||
|
|
||||||
class LanguageManager
|
class LanguageManager
|
||||||
{
|
{
|
||||||
|
|
@ -62,6 +60,4 @@ public:
|
||||||
bool isLanguageInstalled(const std::string &language) const;
|
bool isLanguageInstalled(const std::string &language) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace languages
|
} // namespace deskflow::languages
|
||||||
|
|
||||||
} // namespace deskflow
|
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,7 @@
|
||||||
#include "DeskflowXkbKeyboard.h"
|
#include "DeskflowXkbKeyboard.h"
|
||||||
#include "base/Log.h"
|
#include "base/Log.h"
|
||||||
|
|
||||||
namespace deskflow {
|
namespace deskflow::linux {
|
||||||
|
|
||||||
namespace linux {
|
|
||||||
|
|
||||||
DeskflowXkbKeyboard::DeskflowXkbKeyboard()
|
DeskflowXkbKeyboard::DeskflowXkbKeyboard()
|
||||||
{
|
{
|
||||||
|
|
@ -47,8 +45,6 @@ DeskflowXkbKeyboard::~DeskflowXkbKeyboard()
|
||||||
std::free(m_data.options);
|
std::free(m_data.options);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace linux
|
} // namespace deskflow::linux
|
||||||
|
|
||||||
} // namespace deskflow
|
|
||||||
|
|
||||||
#endif // WINAPI_XWINDOWS
|
#endif // WINAPI_XWINDOWS
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,7 @@
|
||||||
#include <X11/extensions/XKBrules.h>
|
#include <X11/extensions/XKBrules.h>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
namespace deskflow {
|
namespace deskflow::linux {
|
||||||
|
|
||||||
namespace linux {
|
|
||||||
|
|
||||||
class DeskflowXkbKeyboard
|
class DeskflowXkbKeyboard
|
||||||
{
|
{
|
||||||
|
|
@ -32,8 +30,6 @@ public:
|
||||||
~DeskflowXkbKeyboard();
|
~DeskflowXkbKeyboard();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace linux
|
} // namespace deskflow::linux
|
||||||
|
|
||||||
} // namespace deskflow
|
|
||||||
|
|
||||||
#endif // WINAPI_XWINDOWS
|
#endif // WINAPI_XWINDOWS
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue