Skip to content

Commit

Permalink
Fox MSVC compiler warnings
Browse files Browse the repository at this point in the history
reg.: conversion from 'size_t' to 'int', possible loss of data (C4267) in thord party code
  • Loading branch information
Jojo-Schmitz committed Dec 27, 2024
1 parent eea2c0d commit e22f588
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion thirdparty/beatroot/BeatTracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ std::vector<double> beatTrack(const AgentParameters &params,
int count = 0;
double beatTime = -1;
if (!beats.empty()) {
count = beats.size() - 1;
count = static_cast<int>(beats.size()) - 1;
EventList::const_iterator itr = beats.end();
--itr;
beatTime = itr->time;
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/rtf2html/fmt_opts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ std::string formatting_options::get_style_id(const std::string &style)
strmap::iterator i_style = styles.find(style);
if (i_style == styles.end())
{
i_style = styles.insert(strmap::value_type(style, std::string("cls") + from_int(styles.size()))).first;
i_style = styles.insert(strmap::value_type(style, std::string("cls") + from_int(static_cast<int>(styles.size())))).first;
}
return i_style->second;
}
Expand Down
6 changes: 2 additions & 4 deletions thirdparty/rtf2html/rtf2html.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
#include "rtf_keyword.h"
#include "fmt_opts.h"
#include <cstdlib>
#include <stdexcept>
#include <fstream>
#include <string>

QString rtf2html(const QString& iString)
Expand Down Expand Up @@ -554,8 +552,8 @@ QString rtf2html(const QString& iString)
}
}

QString qTitle(QString::fromUtf8(title.data(), title.size()));
QString qHtml(QString::fromUtf8(html.data(), html.size()));
QString qTitle(QString::fromUtf8(title.data(), static_cast<int>(title.size())));
QString qHtml(QString::fromUtf8(html.data(), static_cast<int>(html.size())));

oString = QString("<html><head><STYLE type=\"text/css\">body {padding-left:"
"%1"
Expand Down

0 comments on commit e22f588

Please sign in to comment.