mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-05 00:09:32 -04:00
fix indentation
This commit is contained in:
parent
2e0b29936c
commit
fcc8a5cc3f
8
external/mdal/3rdparty/libplyxx.h
vendored
8
external/mdal/3rdparty/libplyxx.h
vendored
@ -79,7 +79,7 @@ namespace libply
|
||||
virtual IProperty &operator=( unsigned char value ) = 0;
|
||||
virtual IProperty &operator=( char value ) = 0;
|
||||
virtual IProperty &operator=( unsigned short value ) = 0;
|
||||
virtual IProperty &operator=( short value) = 0;
|
||||
virtual IProperty &operator=( short value ) = 0;
|
||||
virtual IProperty &operator=( unsigned int value ) = 0;
|
||||
virtual IProperty &operator=( int value ) = 0;
|
||||
virtual IProperty &operator=( float value ) = 0;
|
||||
@ -105,7 +105,7 @@ namespace libply
|
||||
|
||||
virtual ~ScalarProperty() = default;
|
||||
|
||||
virtual ScalarProperty &operator= ( unsigned char value) override
|
||||
virtual ScalarProperty &operator= ( unsigned char value ) override
|
||||
{
|
||||
m_value = static_cast<InternalType>( value );
|
||||
return *this;
|
||||
@ -115,12 +115,12 @@ namespace libply
|
||||
m_value = static_cast<InternalType>( value );
|
||||
return *this;
|
||||
};
|
||||
virtual ScalarProperty &operator= ( unsigned short value) override
|
||||
virtual ScalarProperty &operator= ( unsigned short value ) override
|
||||
{
|
||||
m_value = static_cast<InternalType>( value );
|
||||
return *this;
|
||||
};
|
||||
virtual ScalarProperty &operator= ( short value ) override
|
||||
virtual ScalarProperty &operator= ( short value ) override
|
||||
{
|
||||
m_value = static_cast<InternalType>( value );
|
||||
return *this;
|
||||
|
14
external/mdal/3rdparty/libplyxx/libplyxx.cpp
vendored
14
external/mdal/3rdparty/libplyxx/libplyxx.cpp
vendored
@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
Updated (c) 2021 / 23 Runette Software Ltd to make multiplatform, to complete the
|
||||
Updated (c) 2021 / 23 Runette Software Ltd to make multiplatform, to complete the
|
||||
typemaps and add voxel types.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
@ -76,7 +76,7 @@ namespace libply
|
||||
|
||||
std::string File::format() const
|
||||
{
|
||||
return formatString(m_parser->format);
|
||||
return formatString( m_parser->format );
|
||||
}
|
||||
|
||||
|
||||
@ -381,10 +381,11 @@ namespace libply
|
||||
for ( PropertyDefinition p : properties )
|
||||
{
|
||||
uint32_t endian;
|
||||
if ( format == File::Format::BINARY_LITTLE_ENDIAN)
|
||||
if ( format == File::Format::BINARY_LITTLE_ENDIAN )
|
||||
{
|
||||
endian = LITTLE_ENDIAN;
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
endian = BIG_ENDIAN;
|
||||
}
|
||||
@ -581,7 +582,8 @@ namespace libply
|
||||
if ( format == File::Format::BINARY_LITTLE_ENDIAN )
|
||||
{
|
||||
endian = LITTLE_ENDIAN;
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
endian = BIG_ENDIAN;
|
||||
}
|
||||
@ -662,7 +664,7 @@ namespace libply
|
||||
file << "ply" << std::endl;
|
||||
file << "format " << formatString( m_format ) << " 1.0" << std::endl;
|
||||
file << "obj_info Generated by MDAL" << std::endl;
|
||||
for( const std::pair<const std::string, std::string>& item : metadata )
|
||||
for ( const std::pair<const std::string, std::string> &item : metadata )
|
||||
{
|
||||
file << "comment " << item.first << ": " << item.second << std::endl;
|
||||
}
|
||||
|
@ -108,24 +108,24 @@ namespace libply
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
T endian_convert(T w, uint32_t endian)
|
||||
T endian_convert( T w, uint32_t endian )
|
||||
{
|
||||
// This gets optimized out into if (endian == host_endian) return w;
|
||||
union { uint64_t quad; uint32_t islittle; } t;
|
||||
t.quad = 1;
|
||||
if (t.islittle ^ endian) return w;
|
||||
if ( t.islittle ^ endian ) return w;
|
||||
|
||||
auto ptr = reinterpret_cast<std::uint8_t*>(&w);
|
||||
std::array<std::uint8_t, sizeof(T)> raw_src, raw_dst;
|
||||
auto ptr = reinterpret_cast<std::uint8_t *>( &w );
|
||||
std::array<std::uint8_t, sizeof( T )> raw_src, raw_dst;
|
||||
|
||||
for(std::size_t i = 0; i < sizeof(T); ++i)
|
||||
raw_src[i] = ptr[i];
|
||||
for ( std::size_t i = 0; i < sizeof( T ); ++i )
|
||||
raw_src[i] = ptr[i];
|
||||
|
||||
std::reverse_copy(raw_src.begin(), raw_src.end(), raw_dst.begin());
|
||||
std::reverse_copy( raw_src.begin(), raw_src.end(), raw_dst.begin() );
|
||||
|
||||
for(std::size_t i = 0; i < sizeof(T); ++i)
|
||||
ptr[i] = raw_dst[i];
|
||||
return *reinterpret_cast<T*>(ptr);
|
||||
for ( std::size_t i = 0; i < sizeof( T ); ++i )
|
||||
ptr[i] = raw_dst[i];
|
||||
return *reinterpret_cast<T *>( ptr );
|
||||
};
|
||||
|
||||
/// Type conversion functions.
|
||||
@ -244,7 +244,7 @@ namespace libply
|
||||
|
||||
inline std::stringstream &write_convert_DOUBLE( IProperty &property, std::stringstream &ss )
|
||||
{
|
||||
ss << MDAL::doubleToString( static_cast<double>( property ), 12);
|
||||
ss << MDAL::doubleToString( static_cast<double>( property ), 12 );
|
||||
return ss;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user