summaryrefslogtreecommitdiff
path: root/codemaker/source/javamaker/classfile.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-04-26 13:59:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-04-26 19:44:07 +0200
commit59ad8d6d15c893e8873f4afb55a24ab3e58fa2c1 (patch)
treeaa43c239a8b91a6eef900264d2650cbe3d6505c6 /codemaker/source/javamaker/classfile.cxx
parentfe0d8555150949bb8729c656af62917ffc48bbf8 (diff)
loplugin:ostr in codemaker,unoidl
Change-Id: I75f5531023f31da029491ce4a078005eebbfe59e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166738 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'codemaker/source/javamaker/classfile.cxx')
-rw-r--r--codemaker/source/javamaker/classfile.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/codemaker/source/javamaker/classfile.cxx b/codemaker/source/javamaker/classfile.cxx
index 880191045d89..fd32497508c6 100644
--- a/codemaker/source/javamaker/classfile.cxx
+++ b/codemaker/source/javamaker/classfile.cxx
@@ -73,7 +73,7 @@ void appendStream(
void write(FileStream & file, void const * buffer, sal_uInt64 size) {
if (!file.write(buffer, size))
- throw CannotDumpException("Error writing file");
+ throw CannotDumpException(u"Error writing file"_ustr);
}
void writeU2(FileStream & file, sal_uInt16 data) {
@@ -234,7 +234,7 @@ void ClassFile::Code::instrLookupswitch(
// <match--offset pairs...>:
std::vector< std::pair< sal_Int32, Code * > >::size_type size = blocks.size();
if (size > SAL_MAX_INT32) {
- throw CannotDumpException("Lookup-switch too large for Java class file format");
+ throw CannotDumpException(u"Lookup-switch too large for Java class file format"_ustr);
}
Position pos1 = m_code.size();
appendU1(m_code, 0xAB);
@@ -408,7 +408,7 @@ void ClassFile::Code::addException(
{
OSL_ASSERT(start < end && end <= m_code.size() && handler <= m_code.size());
if (m_exceptionTableLength == SAL_MAX_UINT16) {
- throw CannotDumpException("Too many exception handlers for Java class file format");
+ throw CannotDumpException(u"Too many exception handlers for Java class file format"_ustr);
}
++m_exceptionTableLength;
appendU2(m_exceptionTable, static_cast< sal_uInt16 >(start));
@@ -549,7 +549,7 @@ sal_uInt16 ClassFile::addDoubleInfo(double value) {
void ClassFile::addInterface(OString const & interface) {
if (m_interfacesCount == SAL_MAX_UINT16) {
- throw CannotDumpException("Too many interfaces for Java class file format");
+ throw CannotDumpException(u"Too many interfaces for Java class file format"_ustr);
}
++m_interfacesCount;
appendU2(m_interfaces, addClassInfo(interface));
@@ -561,7 +561,7 @@ void ClassFile::addField(
OString const & signature)
{
if (m_fieldsCount == SAL_MAX_UINT16) {
- throw CannotDumpException("Too many fields for Java class file format");
+ throw CannotDumpException(u"Too many fields for Java class file format"_ustr);
}
++m_fieldsCount;
appendU2(m_fields, static_cast< sal_uInt16 >(accessFlags));
@@ -586,7 +586,7 @@ void ClassFile::addMethod(
OString const & signature)
{
if (m_methodsCount == SAL_MAX_UINT16) {
- throw CannotDumpException("Too many methods for Java class file format");
+ throw CannotDumpException(u"Too many methods for Java class file format"_ustr);
}
++m_methodsCount;
appendU2(m_methods, static_cast< sal_uInt16 >(accessFlags));
@@ -594,7 +594,7 @@ void ClassFile::addMethod(
appendU2(m_methods, addUtf8Info(descriptor));
std::vector< OString >::size_type excs = exceptions.size();
if (excs > SAL_MAX_UINT16) {
- throw CannotDumpException("Too many exception specifications for Java class file format");
+ throw CannotDumpException(u"Too many exception specifications for Java class file format"_ustr);
}
appendU2(
m_methods,
@@ -609,7 +609,7 @@ void ClassFile::addMethod(
> (SAL_MAX_UINT32 - (2 + 2 + 4 + 2 + 2)
- static_cast< sal_uInt32 >(codeSize))))
{
- throw CannotDumpException("Code block is too big for Java class file format");
+ throw CannotDumpException(u"Code block is too big for Java class file format"_ustr);
}
appendU2(m_methods, addUtf8Info("Code"_ostr));
appendU4(
@@ -660,7 +660,7 @@ void ClassFile::write(FileStream & file) const {
sal_uInt16 ClassFile::nextConstantPoolIndex(sal_uInt16 width) {
OSL_ASSERT(width == 1 || width == 2);
if (m_constantPoolCount > SAL_MAX_UINT16 - width) {
- throw CannotDumpException("Too many constant pool items for Java class file format");
+ throw CannotDumpException(u"Too many constant pool items for Java class file format"_ustr);
}
sal_uInt16 index = m_constantPoolCount;
m_constantPoolCount = m_constantPoolCount + width;
@@ -673,7 +673,7 @@ sal_uInt16 ClassFile::addUtf8Info(OString const & value) {
return i->second;
}
if (value.getLength() > SAL_MAX_UINT16) {
- throw CannotDumpException("UTF-8 string too long for Java class file format");
+ throw CannotDumpException(u"UTF-8 string too long for Java class file format"_ustr);
}
sal_uInt16 index = nextConstantPoolIndex(1);
appendU1(m_constantPool, 1);