Skip to content

Commit

Permalink
バックスラッシュを削除するコードを簡略化
Browse files Browse the repository at this point in the history
  • Loading branch information
m-tmatma committed Dec 25, 2018
1 parent 0f6f3fd commit 4f72be6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sakura_core/cmd/CViewCommander_Clipboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1128,14 +1128,14 @@ void CViewCommander::Command_COPYFOLDER( void )
std::wstring strFolder(GetDocument()->m_cDocFile.GetFilePathClass().GetDirPath());

/* 末尾にバックスラッシュがあれば取り除く */
auto itr = strFolder.rbegin();
if (*itr == L'\\')
auto itrClear = strFolder.end();
itrClear--;
if (*itrClear == L'\\')
{
auto itrClear = strFolder.end();
itrClear--;
strFolder.erase(itrClear);
}

/* クリップボードにフォルダ名をコピー */
m_pCommanderView->MySetClipboardData( strFolder.c_str(), wcslen(strFolder.c_str()), false );
}

Expand Down

0 comments on commit 4f72be6

Please sign in to comment.