diff --git a/packages/quicktype-core/src/language/CPlusPlus/CPlusPlusRenderer.ts b/packages/quicktype-core/src/language/CPlusPlus/CPlusPlusRenderer.ts index 4b70339f2..e9694d857 100644 --- a/packages/quicktype-core/src/language/CPlusPlus/CPlusPlusRenderer.ts +++ b/packages/quicktype-core/src/language/CPlusPlus/CPlusPlusRenderer.ts @@ -198,7 +198,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { // }; // // checking to see if the collapse of the variant has - // occured and then doing the isCycleBreakerType check + // occurred and then doing the isCycleBreakerType check // on the single type the variant would contain seems // to solve the problem. But does this point to a problem // with the core library or with the CPlusPlus package @@ -916,7 +916,7 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { if (constraints === undefined) return; const { minMax, minMaxLength, pattern } = constraints; - // TODO is there a better way to check if property.type is an interger or a number? + // TODO is there a better way to check if property.type is an integer or a number? const cppType = this.cppType( property.type, { @@ -1627,7 +1627,9 @@ export class CPlusPlusRenderer extends ConvenienceRenderer { ); }); this.emitLine( - `default: throw std::runtime_error("Unexpected value in enumeration \\"${enumName}\\": " + std::to_string(static_cast(x)));` + `default: throw std::runtime_error("Unexpected value in enumeration \\"`, + enumName, + `\\": " + std::to_string(static_cast(x)));` ); }); } diff --git a/packages/quicktype-core/src/rewrites/ExpandStrings.ts b/packages/quicktype-core/src/rewrites/ExpandStrings.ts index abddcfab5..f8a86385a 100644 --- a/packages/quicktype-core/src/rewrites/ExpandStrings.ts +++ b/packages/quicktype-core/src/rewrites/ExpandStrings.ts @@ -173,7 +173,7 @@ export function expandStrings(ctx: RunContext, graph: TypeGraph, inference: Enum const transformations = mappedStringTypes.transformations; // FIXME: This is probably wrong, or at least overly conservative. This is for the case // where some attributes are identity ones, i.e. where we can't merge the primitive types, - // like it happens in the line after the `if`. The case where this occured was with URI + // like it happens in the line after the `if`. The case where this occurred was with URI // attributes: we had two separate string types with different URI attributes, but because // both are rewritten via `getPrimitiveType` below without any attributes, they end up // being the same string type. diff --git a/test/fixtures/cplusplus/main.cpp b/test/fixtures/cplusplus/main.cpp index 3052e3c21..d963530b5 100644 --- a/test/fixtures/cplusplus/main.cpp +++ b/test/fixtures/cplusplus/main.cpp @@ -14,14 +14,14 @@ int main(int argc, const char * argv[]) { std::cerr << "Usage: " << argv[0] << " FILE"; return 1; } - + std::ifstream t(argv[1]); std::string str((std::istreambuf_iterator(t)), std::istreambuf_iterator()); TopLevel tl = json::parse(str); json j2 = tl; - + std::cout << j2 << std::endl; return 0;