diff options
author | Jooyung Han <jooyung@google.com> | 2023-01-30 08:11:05 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-01-30 08:11:05 +0000 |
commit | 6ca30babdd6cf1b3a3a11fca6f8ff09b129f2ada (patch) | |
tree | e9bc2ddb4066404a333b63f73fb032b4ecff984e | |
parent | aa6b29cd846a4cf3a921ff91a1299f0b2b0ce5b4 (diff) | |
parent | 90ffcd50eac2832776b5bdfd712d047aecb5fe0f (diff) | |
download | xsdc-6ca30babdd6cf1b3a3a11fca6f8ff09b129f2ada.tar.gz |
Remove unused local variables am: aea94343c2 am: 90ffcd50ea
Original change: https://android-review.googlesource.com/c/platform/system/tools/xsdc/+/2406333
Change-Id: I9cfe60c4b7894d200f78fde4f34c129b8f141aa0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | src/main/java/com/android/xsdc/cpp/CppCodeGenerator.java | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/main/java/com/android/xsdc/cpp/CppCodeGenerator.java b/src/main/java/com/android/xsdc/cpp/CppCodeGenerator.java index bf8ebb7..5fb0b1d 100644 --- a/src/main/java/com/android/xsdc/cpp/CppCodeGenerator.java +++ b/src/main/java/com/android/xsdc/cpp/CppCodeGenerator.java @@ -411,7 +411,7 @@ public class CppCodeGenerator { elementTypes.add(cppType); } List<CppSimpleType> attributeTypes = new ArrayList<>(); - List<XsdAttribute> attributes = new ArrayList(); + List<XsdAttribute> attributes = new ArrayList<>(); for (XsdAttributeGroup attributeGroup : complexType.getAttributeGroups()) { attributes.addAll(getAllAttributes(resolveAttributeGroup(attributeGroup))); } @@ -654,8 +654,6 @@ public class CppCodeGenerator { */ private void printWriter(String name, String nameScope, XsdComplexType complexType) throws CppCodeGeneratorException { - CppSimpleType baseValueType = (complexType instanceof XsdSimpleContent) ? - getValueType((XsdSimpleContent) complexType, true) : null; List<XsdElement> allElements = new ArrayList<>(); List<XsdAttribute> allAttributes = new ArrayList<>(); stackComponents(complexType, allElements, allAttributes); @@ -862,7 +860,6 @@ public class CppCodeGenerator { List<XsdAttribute> allAttributes = new ArrayList<>(); stackComponents(complexType, allElements, allAttributes); - List<CppType> allElementTypes = new ArrayList<>(); for (XsdElement element : allElements) { XsdElement elementValue = resolveElement(element); CppType type = parseType(elementValue.getType(), elementValue.getName()); @@ -886,7 +883,6 @@ public class CppCodeGenerator { parentArgs.append(String.format(", %s", variableName)); } } - List<CppSimpleType> allAttributeTypes = new ArrayList<>(); for (XsdAttribute attribute : allAttributes) { CppType type = parseSimpleType(resolveAttribute(attribute).getType(), false); String variableName = Utils.toVariableName(resolveAttribute(attribute).getName()); @@ -989,13 +985,10 @@ public class CppCodeGenerator { parserCppFile.printf("}\n\n"); } - String className = Utils.toClassName(pkgName); - boolean isMultiRootElement = xmlSchema.getElementMap().values().size() > 1; for (XsdElement element : xmlSchema.getElementMap().values()) { CppType cppType = parseType(element.getType(), element.getName()); String elementName = element.getName(); - String VariableName = Utils.toVariableName(elementName); String typeName = cppType instanceof CppSimpleType ? cppType.getName() : Utils.toClassName(cppType.getName()); @@ -1308,7 +1301,6 @@ public class CppCodeGenerator { } boolean results = false; for (XsdElement element : complexType.getElements()) { - XsdElement elementValue = resolveElement(element); if (element.getRef() == null && element.getType().getRef() == null && element.getType() instanceof XsdComplexType) { results = hasAttribute((XsdComplexType) element.getType()); |