Skip to content

Commit

Permalink
very minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gamedemons committed Apr 19, 2024
1 parent bd5ca99 commit c98a785
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions main/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ void gui::Render(int iniTheme) noexcept

std::string chapter = lance::getFileContents(chapterPath);
long long chapter_size = lance::getFileSize(chapterPath);
stat_cumulative_file_size += chapter_size;
stat_cumulative_file_size += (long)chapter_size;
if (chapter_size + outputPreview.length() < 9000000) {
outputPreview += chapter + seperator;
}
Expand Down Expand Up @@ -992,7 +992,7 @@ void gui::Render(int iniTheme) noexcept
string selectedIndexPath = realFileNames.at(oldChapterName_Index);
stat_selected_chapter_name = lance::extractOldName(selectedIndexPath, false);
long long selected_chapter_size = lance::getFileSize(selectedIndexPath);
stat_selected_chapter_size = selected_chapter_size;
stat_selected_chapter_size = (long)selected_chapter_size;
std::ifstream ch_first_line(selectedIndexPath);
std::getline(ch_first_line, stat_selected_chapter_firstline);
if (selected_chapter_size < 490000) {
Expand All @@ -1012,7 +1012,7 @@ void gui::Render(int iniTheme) noexcept
string selectedIndexPath = realFileNames.at(oldChapterName_Index);
stat_selected_chapter_name = lance::extractOldName(selectedIndexPath, false);
long long selected_chapter_size = lance::getFileSize(selectedIndexPath);
stat_selected_chapter_size = selected_chapter_size;
stat_selected_chapter_size = (long)selected_chapter_size;
std::ifstream ch_first_line(selectedIndexPath);
std::getline(ch_first_line, stat_selected_chapter_firstline);
if (selected_chapter_size < 490000) {
Expand Down Expand Up @@ -1394,7 +1394,7 @@ long lance::getLineCount(std::string str)
{
long count = 0;
std::ifstream inFile(str);
count = std::count(std::istreambuf_iterator<char>(inFile), std::istreambuf_iterator<char>(), '\n');
count = (long)std::count(std::istreambuf_iterator<char>(inFile), std::istreambuf_iterator<char>(), '\n');
return count;
};

Expand Down Expand Up @@ -1463,9 +1463,8 @@ std::string lance::fRenameFile(
} while (end != -1);

int numberingParametersSize = numberingParameters.size();
int tmp_index = stoi(numberingParameters[0]);
if (
numberingParametersSize == 3 &&
unsigned int tmp_index = abs(stoi(numberingParameters[0]));
if (numberingParametersSize == 3 &&
strlen(newName.c_str()) >= tmp_index &&
lance::isNumber(numberingParameters[0]) &&
lance::isNumber(numberingParameters[1]) &&
Expand Down

0 comments on commit c98a785

Please sign in to comment.