Skip to content

Commit

Permalink
Clean up code by suppressing unused parameter warnings in AbstractPro…
Browse files Browse the repository at this point in the history
…cess methods
  • Loading branch information
soramimi committed Jul 21, 2024
1 parent 4b1cb9c commit 78185e0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
6 changes: 6 additions & 0 deletions src/AbstractProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,23 @@ class DryRunPtyProcess : public AbstractPtyProcess {
}
void writeInput(const char *ptr, int len)
{
(void)ptr;
(void)len;
}
int readOutput(char *ptr, int len)
{
(void)ptr;
(void)len;
return 0;
}
void start(const QString &cmd, const QString &env)
{
(void)env;
command_ = cmd;
}
bool wait(unsigned long time)
{
(void)time;
return true;
}
void stop()
Expand Down
3 changes: 1 addition & 2 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3089,7 +3089,6 @@ void MainWindow::updateCommitGraph(Git::CommitItemList *logs)
elements.erase(elements.begin() + j); // 移動元を削除
elements.insert(elements.begin() + i, std::move(t)); // 現在位置の次に挿入
index1 = index2;
f = e;
} else {
j++;
}
Expand Down Expand Up @@ -4211,7 +4210,7 @@ void MainWindow::updateCurrentFilesList(RepositoryWrapperFrame *frame)
{
std::lock_guard lock(frame->commit_log_mutex);
auto const &logs = frame->commit_log;
int count = (int)logs.size();
const int count = (int)logs.size();
Q_ASSERT(index >= 0 && index < count);
commit = logs[index];
}
Expand Down
1 change: 1 addition & 0 deletions src/common/strformat.h
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,7 @@ class string_formatter {
std::string str()
{
int n = length();
if (n < 1) return {};
char *p;
std::vector<char> tmp;
if (n < 0x20000) {
Expand Down
2 changes: 0 additions & 2 deletions src/texteditor/AbstractCharacterBasedApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1748,14 +1748,12 @@ void AbstractCharacterBasedApplication::updateCursorPos(bool auto_scroll)
std::vector<int> pts;
makeColumnPosList(&pts);
if (pts.size() > 1) {
int newcol = pts.back();
int newindex = (int)pts.size() - 1;
for (int i = 0; i + 1 < (int)pts.size(); i++) {
int x = pts[i];
if (x <= col && col < pts[i + 1]) {
char_span = pts[i + 1] - pts[i];
newindex = i;
newcol = x;
break;
}
}
Expand Down

0 comments on commit 78185e0

Please sign in to comment.