diff options
author | Benjamin Ni <benjaminniri@hotmail.com> | 2015-09-25 11:41:53 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-11-02 23:40:57 +0100 |
commit | be729e772196f33543e21cb9bac21add87726b20 (patch) | |
tree | f2150f458e2b07f8924b4702d37c09c8dd52215a /codemaker/source | |
parent | 6ccf68622e51c1b727dd042c1c1a71b5d1fd6a12 (diff) |
tdf#94269: Replace "n" prefix for bool variables with "b"
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797
Signed-off-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'codemaker/source')
-rw-r--r-- | codemaker/source/codemaker/exceptiontree.cxx | 6 | ||||
-rw-r--r-- | codemaker/source/codemaker/global.cxx | 12 | ||||
-rw-r--r-- | codemaker/source/cppumaker/cpputype.cxx | 72 | ||||
-rw-r--r-- | codemaker/source/cppumaker/dumputils.cxx | 24 | ||||
-rw-r--r-- | codemaker/source/javamaker/javatype.cxx | 12 |
5 files changed, 63 insertions, 63 deletions
diff --git a/codemaker/source/codemaker/exceptiontree.cxx b/codemaker/source/codemaker/exceptiontree.cxx index 09c3b87083a4..c3f555c3d8cb 100644 --- a/codemaker/source/codemaker/exceptiontree.cxx +++ b/codemaker/source/codemaker/exceptiontree.cxx @@ -51,10 +51,10 @@ void ExceptionTree::add( rtl::OString const & name, rtl::Reference< TypeManager > const & manager) { std::vector< rtl::OString > list; - bool runtimeException = false; + bool bRuntimeException = false; for (rtl::OString n(name); n != "com.sun.star.uno.Exception";) { if (n == "com.sun.star.uno.RuntimeException") { - runtimeException = true; + bRuntimeException = true; break; } list.push_back(n); @@ -67,7 +67,7 @@ void ExceptionTree::add( getDirectBase()); assert(!n.isEmpty()); } - if (!runtimeException) { + if (!bRuntimeException) { ExceptionTreeNode * node = &m_root; for (std::vector< rtl::OString >::reverse_iterator i(list.rbegin()); !node->present; ++i) diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx index 7ac1e7c546a7..810f91e61e0e 100644 --- a/codemaker/source/codemaker/global.cxx +++ b/codemaker/source/codemaker/global.cxx @@ -75,31 +75,31 @@ OString createFileNameFromType( const OString& destination, sal_uInt32 length = destination.getLength(); - bool withPoint = false; + bool bWithPoint = false; if (length == 0) { length++; - withPoint = true; + bWithPoint = true; } length += prefix.getLength() + type.getLength() + postfix.getLength(); - bool withSeparator = false; + bool bWithSeparator = false; if (!(destination.endsWith("\\") || destination.endsWith("/")) && !(type.startsWith("\\") || type.startsWith("/"))) { length++; - withSeparator = true; + bWithSeparator = true; } OStringBuffer fileNameBuf(length); - if (withPoint) + if (bWithPoint) fileNameBuf.append('.'); else fileNameBuf.append(destination.getStr(), destination.getLength()); - if (withSeparator) + if (bWithSeparator) fileNameBuf.append("/", 1); OString tmpStr(type); diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx index 9feace203404..58a67b23d3d3 100644 --- a/codemaker/source/cppumaker/cpputype.cxx +++ b/codemaker/source/cppumaker/cpputype.cxx @@ -1563,20 +1563,20 @@ void InterfaceType::dumpExceptionSpecification( out << " /*"; #endif out << " throw ("; - bool first = true; + bool bFirst = true; for (std::vector< OUString >::const_iterator i(exceptions.begin()); i != exceptions.end(); ++i) { if (*i != "com.sun.star.uno.RuntimeException") { - if (!first) { + if (!bFirst) { out << ", "; } out << codemaker::cpp::scopedCppName(u2b(*i)); - first = false; + bFirst = false; } } if (runtimeException) { - if (!first) { + if (!bFirst) { out << ", "; } out << "::css::uno::RuntimeException, ::std::exception"; @@ -1822,17 +1822,17 @@ void PlainStructType::dumpDeclaration(FileStream & out) { out << indent() << "inline " << id_ << "();\n"; if (!entity_->getDirectMembers().empty() || getInheritedMemberCount() > 0) { out << "\n" << indent() << "inline " << id_ << "("; - bool first = !dumpBaseMembers(out, base, true); + bool bFirst = !dumpBaseMembers(out, base, true); for (std::vector< unoidl::PlainStructTypeEntity::Member >:: const_iterator i(entity_->getDirectMembers().begin()); i != entity_->getDirectMembers().end(); ++i) { - if (!first) { + if (!bFirst) { out << ", "; } dumpType(out, i->type, true, true); out << " " << i->name << "_"; - first = false; + bFirst = false; } out << ");\n"; } @@ -1872,55 +1872,55 @@ void PlainStructType::dumpHxxFile( out << "\ninline " << id_ << "::" << id_ << "()\n"; inc(); OUString base(entity_->getDirectBase()); - bool first = true; + bool bFirst = true; if (!base.isEmpty()) { out << indent() << ": " << codemaker::cpp::scopedCppName(u2b(base)) << "()\n"; - first = false; + bFirst = false; } for (std::vector< unoidl::PlainStructTypeEntity::Member >::const_iterator i( entity_->getDirectMembers().begin()); i != entity_->getDirectMembers().end(); ++i) { - out << indent() << (first ? ":" : ",") << " " << i->name; + out << indent() << (bFirst ? ":" : ",") << " " << i->name; dumpInitializer(out, false, i->type); out << "\n"; - first = false; + bFirst = false; } dec(); out << "{\n}\n\n"; if (!entity_->getDirectMembers().empty() || getInheritedMemberCount() > 0) { out << "inline " << id_; out << "::" << id_ << "("; - first = !dumpBaseMembers(out, base, true); + bFirst = !dumpBaseMembers(out, base, true); for (std::vector< unoidl::PlainStructTypeEntity::Member >:: const_iterator i(entity_->getDirectMembers().begin()); i != entity_->getDirectMembers().end(); ++i) { - if (!first) { + if (!bFirst) { out << ", "; } dumpType(out, i->type, true, true); out << " " << i->name << "_"; - first = false; + bFirst = false; } out << ")\n"; inc(); - first = true; + bFirst = true; if (!base.isEmpty()) { out << indent() << ": " << codemaker::cpp::scopedCppName(u2b(base)) << "("; dumpBaseMembers(out, base, false); out << ")\n"; - first = false; + bFirst = false; } for (std::vector< unoidl::PlainStructTypeEntity::Member >:: const_iterator i(entity_->getDirectMembers().begin()); i != entity_->getDirectMembers().end(); ++i) { - out << indent() << (first ? ":" : ",") << " " << i->name << "(" + out << indent() << (bFirst ? ":" : ",") << " " << i->name << "(" << i->name << "_)\n"; - first = false; + bFirst = false; } dec(); out << "{\n}\n\n"; @@ -2710,21 +2710,21 @@ void ExceptionType::dumpHxxFile( out << "\ninline " << id_ << "::" << id_ << "()\n"; inc(); OUString base(entity_->getDirectBase()); - bool first = true; + bool bFirst = true; if (!base.isEmpty()) { out << indent() << ": " << codemaker::cpp::scopedCppName(u2b(base)) << "()\n"; - first = false; + bFirst = false; } for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i( entity_->getDirectMembers().begin()); i != entity_->getDirectMembers().end(); ++i) { - out << indent() << (first ? ":" : ",") << " "; + out << indent() << (bFirst ? ":" : ",") << " "; out << i->name; dumpInitializer(out, false, i->type); out << "\n"; - first = false; + bFirst = false; } dec(); out << "{"; @@ -2739,35 +2739,35 @@ void ExceptionType::dumpHxxFile( out << "}\n\n"; if (!entity_->getDirectMembers().empty() || getInheritedMemberCount() > 0) { out << indent() << "inline " << id_ << "::" << id_ << "("; - first = !dumpBaseMembers(out, base, true, false); + bFirst = !dumpBaseMembers(out, base, true, false); for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(entity_->getDirectMembers().begin()); i != entity_->getDirectMembers().end(); ++i) { - if (!first) { + if (!bFirst) { out << ", "; } dumpType(out, i->type, true, true); out << " " << i->name << "_"; - first = false; + bFirst = false; } out << ")\n"; inc(); - first = true; + bFirst = true; if (!base.isEmpty()) { out << indent() << ": " << codemaker::cpp::scopedCppName(u2b(base)) << "("; dumpBaseMembers(out, base, false, false); out << ")\n"; - first = false; + bFirst = false; } for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(entity_->getDirectMembers().begin()); i != entity_->getDirectMembers().end(); ++i) { - out << indent() << (first ? ":" : ",") << " " << i->name << "(" + out << indent() << (bFirst ? ":" : ",") << " " << i->name << "(" << i->name << "_)\n"; - first = false; + bFirst = false; } dec(); out << "{"; @@ -2783,19 +2783,19 @@ void ExceptionType::dumpHxxFile( } out << indent() << id_ << "::" << id_ << "(" << id_ << " const & the_other)"; - first = true; + bFirst = true; if (!base.isEmpty()) { out << ": " << codemaker::cpp::scopedCppName(u2b(base)) << "(the_other)"; - first = false; + bFirst = false; } for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i( entity_->getDirectMembers().begin()); i != entity_->getDirectMembers().end(); ++i) { - out << (first ? ":" : ",") << " " << i->name << "(the_other." << i->name + out << (bFirst ? ":" : ",") << " " << i->name << "(the_other." << i->name << ")"; - first = false; + bFirst = false; } out << indent() << " {}\n\n" << indent() << id_ << "::~" << id_ << "() {}\n\n" << indent() << id_ << " & " << id_ << "::operator =(" @@ -2994,17 +2994,17 @@ void ExceptionType::dumpDeclaration(FileStream & out) { if (!entity_->getDirectMembers().empty() || getInheritedMemberCount() > 0) { out << indent() << "inline CPPU_GCC_DLLPRIVATE " << id_ << "("; bool eligibleForDefaults = entity_->getDirectMembers().empty(); - bool first = !dumpBaseMembers(out, base, true, eligibleForDefaults); + bool bFirst = !dumpBaseMembers(out, base, true, eligibleForDefaults); for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(entity_->getDirectMembers().begin()); i != entity_->getDirectMembers().end(); ++i) { - if (!first) { + if (!bFirst) { out << ", "; } dumpType(out, i->type, true, true); out << " " << i->name << "_"; - first = false; + bFirst = false; } out << ");\n\n"; } diff --git a/codemaker/source/cppumaker/dumputils.cxx b/codemaker/source/cppumaker/dumputils.cxx index 8f720f61e35b..90d12dc7d7a0 100644 --- a/codemaker/source/cppumaker/dumputils.cxx +++ b/codemaker/source/cppumaker/dumputils.cxx @@ -31,42 +31,42 @@ namespace codemaker { namespace cppumaker { bool dumpNamespaceOpen( FileStream & out, rtl::OUString const & entityName, bool fullModuleType) { - bool output = false; - bool first = true; + bool bOutput = false; + bool bFirst = true; for (sal_Int32 i = 0; i >= 0;) { rtl::OUString id(entityName.getToken(0, '.', i)); if (fullModuleType || i >= 0) { - if (!first) { + if (!bFirst) { out << " "; } out << "namespace " << id << " {"; - first = false; - output = true; + bFirst = false; + bOutput = true; } } - return output; + return bOutput; } bool dumpNamespaceClose( FileStream & out, rtl::OUString const & entityName, bool fullModuleType) { - bool output = false; - bool first = true; + bool bOutput = false; + bool bFirst = true; for (sal_Int32 i = 0; i >= 0;) { i = entityName.indexOf('.', i); if (i >= 0) { ++i; } if (fullModuleType || i >= 0) { - if (!first) { + if (!bFirst) { out << " "; } out << "}"; - first = false; - output = true; + bFirst = false; + bOutput = true; } } - return output; + return bOutput; } void dumpTypeIdentifier(FileStream & out, rtl::OUString const & entityName) { diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx index d9639c1545be..f31dfee4d508 100644 --- a/codemaker/source/javamaker/javatype.cxx +++ b/codemaker/source/javamaker/javatype.cxx @@ -606,12 +606,12 @@ void writeClassFile( path = options.getOption("-O"); } OString filename(createFileNameFromType(path, type, ".class")); - bool check = false; + bool bCheck = false; if (fileExists(filename)) { if (options.isValid("-G")) { return; } - check = options.isValid("-Gc"); + bCheck = options.isValid("-Gc"); } FileStream tempfile; tempfile.createTempFile(getTempDir(filename)); @@ -632,7 +632,7 @@ void writeClassFile( throw; } tempfile.close(); - if (!makeValidTypeFile(filename, tempname, check)) { + if (!makeValidTypeFile(filename, tempname, bCheck)) { throw CannotDumpException( "Cannot create " + b2u(filename) + " from temporary file " + b2u(tempname)); @@ -1263,7 +1263,7 @@ sal_uInt16 addLoadLocal( + "\" in call to addLoadLocal"); } } else { - bool wrap = false; + bool bWrap = false; if (any) { switch (sort) { case codemaker::UnoType::SORT_BOOLEAN: @@ -1291,7 +1291,7 @@ sal_uInt16 addLoadLocal( case codemaker::UnoType:: SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE: case codemaker::UnoType::SORT_INTERFACE_TYPE: - wrap = true; + bWrap = true; break; case codemaker::UnoType::SORT_SEQUENCE_TYPE: case codemaker::UnoType::SORT_TYPEDEF: @@ -1303,7 +1303,7 @@ sal_uInt16 addLoadLocal( + "\" in call to addLoadLocal"); } } - if (wrap) { + if (bWrap) { code->instrNew("com/sun/star/uno/Any"); code->instrDup(); code->instrNew("com/sun/star/uno/Type"); |