aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRemi Thebault <remi.thebault@gmail.com>2019-01-02 17:13:59 +0100
committerRemi Thebault <remi.thebault@gmail.com>2019-01-02 17:13:59 +0100
commit3b98c494f35b664f8f95ecaefdc368a3e73e6c89 (patch)
treea67f7a260e52288b15e3107d847f46a8876f00ce /tools
parentecf24352e0681c25354bf3f429997fe294e1492b (diff)
downloadspirv-headers-3b98c494f35b664f8f95ecaefdc368a3e73e6c89.tar.gz
whitespace
Diffstat (limited to 'tools')
-rw-r--r--tools/buildHeaders/header.cpp34
-rw-r--r--tools/buildHeaders/header.h10
-rw-r--r--tools/buildHeaders/main.cpp10
3 files changed, 27 insertions, 27 deletions
diff --git a/tools/buildHeaders/header.cpp b/tools/buildHeaders/header.cpp
index e99110d..8e47a99 100644
--- a/tools/buildHeaders/header.cpp
+++ b/tools/buildHeaders/header.cpp
@@ -1,19 +1,19 @@
// Copyright (c) 2014-2018 The Khronos Group Inc.
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
// to deal in the Materials without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Materials, and to permit persons to whom the
// Materials are furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Materials.
-//
+//
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
-// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
-//
+// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
+//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -97,7 +97,7 @@ namespace {
virtual void printEpilogue(std::ostream&) const { }
virtual void printMeta(std::ostream&) const;
virtual void printTypes(std::ostream&) const { }
-
+
virtual std::string escapeComment(const std::string& s) const;
// Default printComments() uses these comment strings
@@ -107,7 +107,7 @@ namespace {
virtual std::string commentEOL(bool isLast) const { return ""; }
typedef std::pair<unsigned, std::string> valpair_t;
-
+
// for printing enum values
virtual std::string enumBeg(const std::string&, enumStyle_t) const { return ""; }
virtual std::string enumEnd(const std::string&, enumStyle_t, bool isLast = false) const {
@@ -126,7 +126,7 @@ namespace {
const char* fmt, bool isLast = false) const {
return "";
}
-
+
std::vector<valpair_t> getSortedVals(const Json::Value&) const;
virtual std::string indent(int count = 1) const {
@@ -149,7 +149,7 @@ namespace {
}
void addComment(Json::Value& node, const std::string& str);
-
+
Json::Value spvRoot; // JSON SPIR-V data
};
@@ -293,7 +293,7 @@ namespace {
{
const int commentCount = spvRoot["spv"]["meta"]["Comment"].size();
int commentNum = 0;
-
+
for (const auto& comment : spvRoot["spv"]["meta"]["Comment"]) {
out << commentBeg();
@@ -325,7 +325,7 @@ namespace {
void TPrinter::printDefs(std::ostream& out) const
{
const Json::Value& enums = spvRoot["spv"]["enum"];
-
+
for (auto opClass = enums.begin(); opClass != enums.end(); ++opClass) {
const bool isMask = (*opClass)["Type"].asString() == "Bit";
const auto opName = (*opClass)["Name"].asString();
@@ -340,8 +340,8 @@ namespace {
out << enumFmt(opPrefix, valpair_t(0, "MaskNone"), enumNoMask);
const auto sorted = getSortedVals((*opClass)["Values"]);
-
- std::string maxEnum = maxEnumFmt(opName, valpair_t(0x7FFFFFFF, "Max"), enumHex);
+
+ std::string maxEnum = maxEnumFmt(opName, valpair_t(0x7FFFFFFF, "Max"), enumHex);
bool printMax = (style != enumMask && maxEnum.size() > 0);
@@ -393,7 +393,7 @@ namespace {
}
return newStr;
}
-
+
std::string fmtConstInt(unsigned val, const std::string& name,
const char* fmt, bool isLast) const override {
return indent(3) + '"' + name + "\": " + fmtNum("%d", val) + (isLast ? "\n" : ",\n");
@@ -491,7 +491,7 @@ namespace {
return std::string("static const unsigned int ") + pre() + name +
" = " + fmtNum(fmt, val) + (isLast ? ";\n\n" : ";\n");
}
-
+
virtual std::string pre() const { return ""; } // C name prefix
virtual std::string headerGuardSuffix() const = 0;
};
@@ -545,7 +545,7 @@ namespace {
if (isMask) {
const auto typeName = opName + styleStr(enumMask);
-
+
out << "inline " + typeName + " operator|(" + typeName + " a, " + typeName + " b) { return " +
typeName + "(unsigned(a) | unsigned(b)); }\n";
}
@@ -557,7 +557,7 @@ namespace {
std::string commentBOL() const override { return "// "; }
-
+
virtual std::string enumBeg(const std::string& s, enumStyle_t style) const override {
return std::string("enum ") + s + styleStr(style) + " {\n";
}
diff --git a/tools/buildHeaders/header.h b/tools/buildHeaders/header.h
index 2f4c999..43d9eb4 100644
--- a/tools/buildHeaders/header.h
+++ b/tools/buildHeaders/header.h
@@ -1,19 +1,19 @@
// Copyright (c) 2014-2018 The Khronos Group Inc.
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
// to deal in the Materials without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Materials, and to permit persons to whom the
// Materials are furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Materials.
-//
+//
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
-// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
-//
+// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
+//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
diff --git a/tools/buildHeaders/main.cpp b/tools/buildHeaders/main.cpp
index b721a90..d40035e 100644
--- a/tools/buildHeaders/main.cpp
+++ b/tools/buildHeaders/main.cpp
@@ -1,19 +1,19 @@
// Copyright (c) 2014-2018 The Khronos Group Inc.
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
// to deal in the Materials without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Materials, and to permit persons to whom the
// Materials are furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Materials.
-//
+//
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
-// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
-//
+// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
+//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL