FIX: Fix review findings

pull/4728/head
Kim Kulling 2022-09-16 22:13:58 +02:00
parent e4c77aa4fa
commit 7ebe21958d
2 changed files with 17 additions and 26 deletions

View File

@ -48,19 +48,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <iostream> #include <iostream>
#include <string> #include <string>
const char *AICMD_MSG_INFO_HELP_E = constexpr char AICMD_MSG_INFO_HELP_E[] =
"assimp info <file> [-r] [-v]\n" "assimp info <file> [-r] [-v]\n"
"\tPrint basic structure of a 3D model\n" "\tPrint basic structure of a 3D model\n"
"\t-r,--raw: No postprocessing, do a raw import\n" "\t-r,--raw: No postprocessing, do a raw import\n"
"\t-v,--verbose: Print verbose info such as node transform data\n" "\t-v,--verbose: Print verbose info such as node transform data\n"
"\t-s, --silent: Print only minimal info\n"; "\t-s, --silent: Print only minimal info\n";
const char *TREE_BRANCH_ASCII = "|-"; constexpr char TREE_BRANCH_ASCII[] = "|-";
const char *TREE_BRANCH_UTF8 = "\xe2\x94\x9c\xe2\x95\xb4"; constexpr char TREE_BRANCH_UTF8[] = "\xe2\x94\x9c\xe2\x95\xb4";
const char *TREE_STOP_ASCII = "'-"; constexpr char TREE_STOP_ASCII[] = "'-";
const char *TREE_STOP_UTF8 = "\xe2\x94\x94\xe2\x95\xb4"; constexpr char TREE_STOP_UTF8[] = "\xe2\x94\x94\xe2\x95\xb4";
const char *TREE_CONTINUE_ASCII = "| "; constexpr char TREE_CONTINUE_ASCII[] = "| ";
const char *TREE_CONTINUE_UTF8 = "\xe2\x94\x82 "; constexpr char TREE_CONTINUE_UTF8[] = "\xe2\x94\x82 ";
// note: by default this is using utf-8 text. // note: by default this is using utf-8 text.
// this is well supported on pretty much any linux terminal. // this is well supported on pretty much any linux terminal.

View File

@ -60,26 +60,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/scene.h> #include <assimp/scene.h>
#include <assimp/Importer.hpp> #include <assimp/Importer.hpp>
#include <assimp/DefaultLogger.hpp> #include <assimp/DefaultLogger.hpp>
#include "../code/Common/Compression.h"
#ifndef ASSIMP_BUILD_NO_EXPORT #ifndef ASSIMP_BUILD_NO_EXPORT
# include <assimp/Exporter.hpp> # include <assimp/Exporter.hpp>
#endif #endif
#ifdef ASSIMP_BUILD_NO_OWN_ZLIB
# include <zlib.h>
#else
# include <../contrib/zlib/zlib.h>
#endif
#ifndef SIZE_MAX #ifndef SIZE_MAX
# define SIZE_MAX (std::numeric_limits<size_t>::max()) # define SIZE_MAX (std::numeric_limits<size_t>::max())
#endif #endif
using namespace Assimp; using namespace Assimp;
// Global assimp importer instance // Global assimp importer instance
extern Assimp::Importer* globalImporter; extern Assimp::Importer* globalImporter;
@ -118,8 +110,8 @@ struct ImportData {
aiVector3D rot; aiVector3D rot;
}; };
/// \enum AssimpCmdError // ------------------------------------------------------------------------------
/// \brief General error codes used among assimp_cmd's utilities. /// @brief General error codes used among assimp_cmd's utilities.
enum AssimpCmdError { enum AssimpCmdError {
Success = 0, Success = 0,
InvalidNumberOfArguments, InvalidNumberOfArguments,
@ -179,8 +171,8 @@ int Assimp_Dump (
const char* const* params, const char* const* params,
unsigned int num); unsigned int num);
/// \enum AssimpCmdExportError // ------------------------------------------------------------------------------
/// \brief Error codes used by the 'Export' utility. /// @brief Error codes used by the 'Export' utility.
enum AssimpCmdExportError { enum AssimpCmdExportError {
FailedToImportModel = AssimpCmdError::LastAssimpCmdError, FailedToImportModel = AssimpCmdError::LastAssimpCmdError,
FailedToExportModel, FailedToExportModel,
@ -199,8 +191,8 @@ int Assimp_Export (
const char* const* params, const char* const* params,
unsigned int num); unsigned int num);
/// \enum AssimpCmdExtractError // ------------------------------------------------------------------------------
/// \brief Error codes used by the 'Image Extractor' utility. /// @brief Error codes used by the 'Image Extractor' utility.
enum AssimpCmdExtractError { enum AssimpCmdExtractError {
TextureIndexIsOutOfRange = AssimpCmdError::LastAssimpCmdError, TextureIndexIsOutOfRange = AssimpCmdError::LastAssimpCmdError,
NoAvailableTextureEncoderFound, NoAvailableTextureEncoderFound,
@ -220,8 +212,8 @@ int Assimp_Extract (
const char* const* params, const char* const* params,
unsigned int num); unsigned int num);
/// \enum AssimpCmdCompareDumpError // ------------------------------------------------------------------------------
/// \brief Error codes used by the 'Compare Dump' utility. /// @brief Error codes used by the 'Compare Dump' utility.
enum AssimpCmdCompareDumpError { enum AssimpCmdCompareDumpError {
FailedToLoadExpectedInputFile = AssimpCmdError::LastAssimpCmdError, FailedToLoadExpectedInputFile = AssimpCmdError::LastAssimpCmdError,
FileComparaisonFailure, FileComparaisonFailure,
@ -241,8 +233,7 @@ int Assimp_CompareDump (
const char* const* params, const char* const* params,
unsigned int num); unsigned int num);
/// \enum AssimpCmdInfoError /// @brief Error codes used by the 'Info' utility.
/// \brief Error codes used by the 'Info' utility.
enum AssimpCmdInfoError { enum AssimpCmdInfoError {
InvalidCombinaisonOfArguments = AssimpCmdError::LastAssimpCmdError, InvalidCombinaisonOfArguments = AssimpCmdError::LastAssimpCmdError,