Skip to content

Commit

Permalink
reformat source code
Browse files Browse the repository at this point in the history
  • Loading branch information
d99kris committed Jul 13, 2024
1 parent dc55d5a commit 5e2471d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/imapmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ImapManager::ImapManager(const std::string& p_User, const std::string& p_Pass,
const ImapManager::Result&)>& p_ResultHandler,
const std::function<void(const StatusUpdate&)>& p_StatusHandler,
const std::function<void(const SearchQuery&,
const SearchResult&)>& p_SearchHandler,
const SearchResult&)>& p_SearchHandler,
const bool p_IdleInbox,
const std::string& p_Inbox)
: m_Imap(p_User, p_Pass, p_Host, p_Port, p_Timeout,
Expand Down
2 changes: 1 addition & 1 deletion src/imapmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class ImapManager
const std::function<void(const ImapManager::Action&, const ImapManager::Result&)>& p_ResultHandler,
const std::function<void(const StatusUpdate&)>& p_StatusHandler,
const std::function<void(const ImapManager::SearchQuery&,
const ImapManager::SearchResult&)>& p_SearchHandler,
const ImapManager::SearchResult&)>& p_SearchHandler,
const bool p_IdleInbox,
const std::string& p_Inbox);
virtual ~ImapManager();
Expand Down
2 changes: 1 addition & 1 deletion src/libetpan_help.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ extern "C" {

struct _mailstream;
typedef struct _mailstream mailstream;
void mailstream_cancel(mailstream * s);
void mailstream_cancel(mailstream* s);

struct mailimap;
typedef struct mailimap mailimap;
Expand Down
6 changes: 4 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ int main(int argc, char* argv[])
const bool isSetup = !setup.empty();
if (isSetup)
{
if ((setup != "gmail") && (setup != "gmail-oauth2") && (setup != "icloud") && (setup != "outlook") && (setup != "outlook-oauth2"))
if ((setup != "gmail") && (setup != "gmail-oauth2") && (setup != "icloud") && (setup != "outlook") &&
(setup != "outlook-oauth2"))
{
std::cerr << "error: unsupported email service \"" << setup << "\".\n\n";
ShowHelp();
Expand Down Expand Up @@ -360,7 +361,8 @@ int main(int argc, char* argv[])
}
else
{
if (!ObtainCacheEncryptPassword(isSetup, user, setupAllowCacheEncrypt, pass, smtpUser, smtpPass, secretConfig, mainConfig))
if (!ObtainCacheEncryptPassword(isSetup, user, setupAllowCacheEncrypt, pass, smtpUser, smtpPass, secretConfig,
mainConfig))
{
return 1;
}
Expand Down
4 changes: 3 additions & 1 deletion src/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6987,7 +6987,9 @@ bool Ui::HandleComposeKey(int p_Key)
const std::string spellCmd = Util::GetSpellCmd();
if (!spellCmd.empty())
{
size_t quoteStartPos = !m_ComposeQuotedStart.empty() ? m_ComposeMessageStr.find(Util::ToWString(m_ComposeQuotedStart)) : std::string::npos;
size_t quoteStartPos =
!m_ComposeQuotedStart.empty() ? m_ComposeMessageStr.find(Util::ToWString(m_ComposeQuotedStart))
: std::string::npos;
if (quoteStartPos == std::string::npos)
{
ExtEditor(spellCmd, m_ComposeMessageStr, m_ComposeMessagePos);
Expand Down
2 changes: 1 addition & 1 deletion src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2164,7 +2164,7 @@ void Util::JumpToPrevMatch(std::wstring& p_Str, int& p_Pos, int p_Offs, std::wst

void Util::RemoveNonAlphaNumSpace(std::string& p_Str)
{
auto it = std::remove_if(p_Str.begin(), p_Str.end(), [](char const &c) {
auto it = std::remove_if(p_Str.begin(), p_Str.end(), [](char const& c) {
return !std::isalnum(c) && (c != ' ');
});

Expand Down

0 comments on commit 5e2471d

Please sign in to comment.