clang format

This commit is contained in:
Johan Bowald 2019-07-17 09:06:45 +02:00
parent 1af7c1d784
commit 52936a00e0

View File

@ -1061,7 +1061,6 @@ class TinyGLTF {
const char *str, const unsigned int length,
const std::string &base_dir, unsigned int check_sections);
const unsigned char *bin_data_;
size_t bin_size_;
bool is_binary_;
@ -3704,8 +3703,7 @@ static bool ParsePerspectiveCamera(PerspectiveCamera *camera, std::string *err,
return true;
}
static bool ParseSpotLight(SpotLight *light,
std::string *err, const json &o) {
static bool ParseSpotLight(SpotLight *light, std::string *err, const json &o) {
ParseNumberProperty(&light->innerConeAngle, err, o, "innerConeAngle", false);
ParseNumberProperty(&light->outerConeAngle, err, o, "outerConeAngle", false);
@ -5268,7 +5266,6 @@ static void SerializeGltfTexture(Texture &texture, json &o) {
/// Serialize all properties except buffers and images.
///
static void SerializeGltfModel(Model *model, json &o) {
// ACCESSORS
json accessors;
for (unsigned int i = 0; i < model->accessors.size(); ++i) {
@ -5296,7 +5293,6 @@ static void SerializeGltfModel(Model *model, json &o) {
SerializeGltfAsset(model->asset, asset);
o["asset"] = asset;
// BUFFERVIEWS
json bufferViews;
for (unsigned int i = 0; i < model->bufferViews.size(); ++i) {
@ -5308,8 +5304,7 @@ static void SerializeGltfModel(Model *model, json &o) {
// Extensions used
if (model->extensionsUsed.size()) {
SerializeStringArrayProperty("extensionsUsed", model->extensionsUsed,
o);
SerializeStringArrayProperty("extensionsUsed", model->extensionsUsed, o);
}
// Extensions required
@ -5441,8 +5436,7 @@ static void SerializeGltfModel(Model *model, json &o) {
}
}
static bool WriteGltfStream(std::ostream &stream,
const std::string &content) {
static bool WriteGltfStream(std::ostream &stream, const std::string &content) {
stream << content << std::endl;
return true;
}
@ -5456,7 +5450,6 @@ static bool WriteGltfFile(const std::string &output,
static void WriteBinaryGltfStream(std::ostream &stream,
const std::string &content) {
const std::string header = "glTF";
const int version = 2;
const int padding_size = content.size() % 4;
@ -5516,8 +5509,9 @@ bool TinyGLTF::WriteGltfSceneToStream(Model *model, std::ostream &stream,
json image;
std::string dummystring = "";
// UpdateImageObject need baseDir but only uses it if embededImages is enable,
// since we won't write separte images when writing to a stream we use a dummystring
// UpdateImageObject need baseDir but only uses it if embededImages is
// enable, since we won't write separte images when writing to a stream we
// use a dummystring
UpdateImageObject(model->images[i], dummystring, int(i), false,
&this->WriteImageData, this->write_image_user_data_);
SerializeGltfImage(model->images[i], image);