mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Fix C++20 compilation on systems where char_type is wchar_t
This commit is contained in:
parent
950eaae5e6
commit
cafa1d4ae4
@ -1771,7 +1771,7 @@ Buffer::ExportStatus Buffer::makeLaTeXFile(FileName const & fname,
|
||||
catch (EncodingException const & e) {
|
||||
docstring const failed(1, e.failed_char);
|
||||
ostringstream oss;
|
||||
oss << "0x" << hex << e.failed_char << dec;
|
||||
oss << "0x" << hex << static_cast<uint32_t>(e.failed_char) << dec;
|
||||
if (getParFromID(e.par_id).paragraph().layout().pass_thru) {
|
||||
docstring msg = bformat(_("Uncodable character '%1$s'"
|
||||
" (code point %2$s)"),
|
||||
|
@ -866,7 +866,7 @@ int LyXComm::startPipe(string const & file, bool write)
|
||||
if (!write) {
|
||||
// Make sure not to call read_ready after destruction.
|
||||
weak_ptr<void> tracker = tracker_.p();
|
||||
theApp()->registerSocketCallback(fd, [=](){
|
||||
theApp()->registerSocketCallback(fd, [this, tracker](){
|
||||
if (!tracker.expired())
|
||||
read_ready();
|
||||
});
|
||||
|
@ -370,9 +370,9 @@ ostream & operator<<(ostream & os, Token const & t)
|
||||
os << '\\' << to_utf8(cs);
|
||||
}
|
||||
else if (t.cat() == catLetter)
|
||||
os << t.character();
|
||||
os << static_cast<uint32_t>(t.character());
|
||||
else
|
||||
os << '[' << t.character() << ',' << t.cat() << ']';
|
||||
os << '[' << static_cast<uint32_t>(t.character()) << ',' << t.cat() << ']';
|
||||
return os;
|
||||
}
|
||||
|
||||
|
@ -854,7 +854,7 @@ void Parser::tokenize_one()
|
||||
}
|
||||
|
||||
case catIgnore: {
|
||||
cerr << "ignoring a char: " << c << "\n";
|
||||
cerr << "ignoring a char: " << static_cast<uint32_t>(c) << "\n";
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user