-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PS-9233: Implementation of UUID v1-v7 functions according to RFC 9562 #5313
PS-9233: Implementation of UUID v1-v7 functions according to RFC 9562 #5313
Conversation
https://perconadev.atlassian.net/browse/PS-9233 UUID lib is from dev branch of upcoming version 1.86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (1/35)
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#include <boost/uuid/uuid.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/uuid.hpp
file not found
int ipos = 0; | ||
|
||
// check open brace | ||
char_type c = get_next_char( begin, end, ipos ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name c
is too short, expected at least 2 characters
|
||
bool has_dashes = false; | ||
|
||
uuid u; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable u
is not initialized
uuid u; | |
uuid u = 0; |
|
||
bool has_dashes = false; | ||
|
||
uuid u; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name u
is too short, expected at least 2 characters
|
||
uuid u; | ||
|
||
int i = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name i
is too short, expected at least 2 characters
return *begin++; | ||
} | ||
|
||
unsigned char get_value( char c, int ipos ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method get_value
can be made static
unsigned char get_value( char c, int ipos ) const | |
static unsigned char get_value( char c, int ipos ) |
return *begin++; | ||
} | ||
|
||
unsigned char get_value( char c, int ipos ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name c
is too short, expected at least 2 characters
return values[ pos ]; | ||
} | ||
|
||
unsigned char get_value( wchar_t c, int ipos ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method get_value
can be made static
unsigned char get_value( wchar_t c, int ipos ) const | |
static unsigned char get_value( wchar_t c, int ipos ) |
return values[ pos ]; | ||
} | ||
|
||
unsigned char get_value( wchar_t c, int ipos ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name c
is too short, expected at least 2 characters
return values[ pos ]; | ||
} | ||
|
||
bool is_dash( char c ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method is_dash
can be made static
bool is_dash( char c ) const | |
static bool is_dash( char c ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (2/35)
return values[ pos ]; | ||
} | ||
|
||
bool is_dash( char c ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name c
is too short, expected at least 2 characters
return c == '-'; | ||
} | ||
|
||
bool is_dash( wchar_t c ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method is_dash
can be made static
bool is_dash( wchar_t c ) const | |
static bool is_dash( wchar_t c ) |
return c == '-'; | ||
} | ||
|
||
bool is_dash( wchar_t c ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name c
is too short, expected at least 2 characters
} | ||
|
||
// return closing brace | ||
bool is_open_brace( char c ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method is_open_brace
can be made static
bool is_open_brace( char c ) const | |
static bool is_open_brace( char c ) |
} | ||
|
||
// return closing brace | ||
bool is_open_brace( char c ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name c
is too short, expected at least 2 characters
return c == '{'; | ||
} | ||
|
||
bool is_open_brace( wchar_t c ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method is_open_brace
can be made static
bool is_open_brace( wchar_t c ) const | |
static bool is_open_brace( wchar_t c ) |
return c == '{'; | ||
} | ||
|
||
bool is_open_brace( wchar_t c ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name c
is too short, expected at least 2 characters
return c == L'{'; | ||
} | ||
|
||
void check_close_brace( char c, char open_brace, int ipos ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method check_close_brace
can be made static
void check_close_brace( char c, char open_brace, int ipos ) const | |
static void check_close_brace( char c, char open_brace, int ipos ) |
return c == L'{'; | ||
} | ||
|
||
void check_close_brace( char c, char open_brace, int ipos ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name c
is too short, expected at least 2 characters
|
||
void check_close_brace( char c, char open_brace, int ipos ) const | ||
{ | ||
if( open_brace == '{' && c == '}' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if with identical then and else branches
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (3/35)
} | ||
} | ||
|
||
void check_close_brace( wchar_t c, wchar_t open_brace, int ipos ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method check_close_brace
can be made static
void check_close_brace( wchar_t c, wchar_t open_brace, int ipos ) const | |
static void check_close_brace( wchar_t c, wchar_t open_brace, int ipos ) |
} | ||
} | ||
|
||
void check_close_brace( wchar_t c, wchar_t open_brace, int ipos ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name c
is too short, expected at least 2 characters
|
||
void check_close_brace( wchar_t c, wchar_t open_brace, int ipos ) const | ||
{ | ||
if( open_brace == L'{' && c == L'}' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if with identical then and else branches
} | ||
}; | ||
|
||
}} // namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
not terminated with a closing comment
} | ||
}; | ||
|
||
}} // namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with a comment that refers to a wrong namespace boost::uuids
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#include <boost/uuid/basic_random_generator.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/basic_random_generator.hpp
file not found
// only provided for compatibility with 1.85 | ||
using random_generator_pure = basic_random_generator<detail::random_device>; | ||
|
||
}} // namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
not terminated with a closing comment
// only provided for compatibility with 1.85 | ||
using random_generator_pure = basic_random_generator<detail::random_device>; | ||
|
||
}} // namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with a comment that refers to a wrong namespace boost::uuids
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#include <boost/uuid/detail/static_assert.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/detail/static_assert.hpp
file not found
namespace uuids { | ||
namespace detail { | ||
|
||
template<class T, class U> T numeric_cast( U u ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name u
is too short, expected at least 2 characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (4/35)
|
||
if( u > std::numeric_limits<T>::max() ) | ||
{ | ||
BOOST_THROW_EXCEPTION( std::range_error( "Argument to numeric_cast is out of range of destination type" ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suspicious exception object created but not thrown; did you mean throw range_error
?
return static_cast<T>( u ); | ||
} | ||
|
||
} // detail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace detail
ends with an unrecognized comment
} | ||
|
||
} // detail | ||
} // uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
ends with an unrecognized comment
|
||
} // detail | ||
} // uuids | ||
} // boost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with an unrecognized comment
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#include <boost/uuid/uuid.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/uuid.hpp
file not found
|
||
std::uniform_int_distribution<std::uint32_t> dist; | ||
|
||
result_type u; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable u
is not initialized
result_type u; | |
result_type u = 0; |
|
||
std::uniform_int_distribution<std::uint32_t> dist; | ||
|
||
result_type u; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name u
is too short, expected at least 2 characters
template<class MaybePseudoRandomNumberGenerator, class En = decltype( std::declval<MaybePseudoRandomNumberGenerator&>().seed() )> | ||
void seed( MaybePseudoRandomNumberGenerator& rng, int ) | ||
{ | ||
detail::random_provider seeder; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable seeder
is not initialized
detail::random_provider seeder; | |
detail::random_provider seeder = 0; |
} | ||
}; | ||
|
||
}} // namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
not terminated with a closing comment
} | ||
}; | ||
|
||
}} // namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with a comment that refers to a wrong namespace boost::uuids
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (5/35)
// This header is no longer needed and is only retained | ||
// for backward compatibility. | ||
|
||
#include <boost/uuid/uuid.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/uuid.hpp
file not found
// This header is no longer needed and is only retained | ||
// for backward compatibility. | ||
|
||
#include <boost/uuid/uuid.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/uuid.hpp
file not found
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#include <boost/uuid/time_generator_v1.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/time_generator_v1.hpp
file not found
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#include <boost/uuid/uuid.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/uuid.hpp
file not found
// to_chars | ||
|
||
template<class OutputIterator> | ||
OutputIterator to_chars( uuid const& u, OutputIterator out ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter u
is unused
OutputIterator to_chars( uuid const& u, OutputIterator out ) | |
OutputIterator to_chars( uuid const& /*u*/, OutputIterator out ) |
// to_chars | ||
|
||
template<class OutputIterator> | ||
OutputIterator to_chars( uuid const& u, OutputIterator out ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name u
is too short, expected at least 2 characters
} | ||
|
||
template<class Ch> | ||
inline bool to_chars( uuid const& u, Ch* first, Ch* last ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter u
is unused
inline bool to_chars( uuid const& u, Ch* first, Ch* last ) noexcept | |
inline bool to_chars( uuid const& /*u*/, Ch* first, Ch* last ) noexcept |
} | ||
|
||
template<class Ch> | ||
inline bool to_chars( uuid const& u, Ch* first, Ch* last ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name u
is too short, expected at least 2 characters
if( last - first < 36 ) | ||
{ | ||
return false; | ||
} | ||
|
||
detail::to_chars( u, first ); | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant boolean literal in conditional return statement
if( last - first < 36 ) | |
{ | |
return false; | |
} | |
detail::to_chars( u, first ); | |
return true; | |
return static_cast<bool>(last - first >= 36); |
} | ||
|
||
template<class Ch, std::size_t N> | ||
inline Ch* to_chars( uuid const& u, Ch (&buffer)[ N ] ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter u
is unused
inline Ch* to_chars( uuid const& u, Ch (&buffer)[ N ] ) noexcept | |
inline Ch* to_chars( uuid const& /*u*/, Ch (&buffer)[ N ] ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (6/35)
} | ||
|
||
template<class Ch, std::size_t N> | ||
inline Ch* to_chars( uuid const& u, Ch (&buffer)[ N ] ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name u
is too short, expected at least 2 characters
// only provided for compatibility; deprecated | ||
template<class Ch> | ||
// BOOST_DEPRECATED( "Use Ch[37] instead of Ch[36] to allow for the null terminator" ) | ||
inline Ch* to_chars( uuid const& u, Ch (&buffer)[ 36 ] ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter u
is unused
inline Ch* to_chars( uuid const& u, Ch (&buffer)[ 36 ] ) noexcept | |
inline Ch* to_chars( uuid const& /*u*/, Ch (&buffer)[ 36 ] ) noexcept |
// only provided for compatibility; deprecated | ||
template<class Ch> | ||
// BOOST_DEPRECATED( "Use Ch[37] instead of Ch[36] to allow for the null terminator" ) | ||
inline Ch* to_chars( uuid const& u, Ch (&buffer)[ 36 ] ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name u
is too short, expected at least 2 characters
// operator<< | ||
|
||
template<class Ch, class Traits> | ||
std::basic_ostream<Ch, Traits>& operator<<( std::basic_ostream<Ch, Traits>& os, uuid const& u ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter u
is unused
std::basic_ostream<Ch, Traits>& operator<<( std::basic_ostream<Ch, Traits>& os, uuid const& u ) | |
std::basic_ostream<Ch, Traits>& operator<<( std::basic_ostream<Ch, Traits>& os, uuid const& /*u*/ ) |
// operator<< | ||
|
||
template<class Ch, class Traits> | ||
std::basic_ostream<Ch, Traits>& operator<<( std::basic_ostream<Ch, Traits>& os, uuid const& u ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name u
is too short, expected at least 2 characters
// operator>> | ||
|
||
template<class Ch, class Traits> | ||
std::basic_istream<Ch, Traits>& operator>>( std::basic_istream<Ch, Traits>& is, uuid& u ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter u
is unused
std::basic_istream<Ch, Traits>& operator>>( std::basic_istream<Ch, Traits>& is, uuid& u ) | |
std::basic_istream<Ch, Traits>& operator>>( std::basic_istream<Ch, Traits>& is, uuid& /*u*/ ) |
// operator>> | ||
|
||
template<class Ch, class Traits> | ||
std::basic_istream<Ch, Traits>& operator>>( std::basic_istream<Ch, Traits>& is, uuid& u ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name u
is too short, expected at least 2 characters
|
||
Ch* const xdigits_end = xdigits + 16; | ||
|
||
Ch c; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name c
is too short, expected at least 2 characters
|
||
// to_string | ||
|
||
inline std::string to_string( uuid const& u ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter u
is unused
inline std::string to_string( uuid const& u ) | |
inline std::string to_string( uuid const& /*u*/ ) |
|
||
// to_string | ||
|
||
inline std::string to_string( uuid const& u ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name u
is too short, expected at least 2 characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (7/35)
return result; | ||
} | ||
|
||
inline std::wstring to_wstring( uuid const& u ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter u
is unused
inline std::wstring to_wstring( uuid const& u ) | |
inline std::wstring to_wstring( uuid const& /*u*/ ) |
return result; | ||
} | ||
|
||
inline std::wstring to_wstring( uuid const& u ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name u
is too short, expected at least 2 characters
return result; | ||
} | ||
|
||
}} //namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
not terminated with a closing comment
return result; | ||
} | ||
|
||
}} //namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with a comment that refers to a wrong namespace boost::uuids
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#include <boost/uuid/uuid.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/uuid.hpp
file not found
|
||
// time_generator_v7 | ||
|
||
class time_generator_v7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class time_generator_v7
defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor
|
||
state_type state_ = {}; | ||
|
||
detail::chacha20_12 rng_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructor does not initialize these fields: rng_
detail::chacha20_12 rng_; | |
detail::chacha20_12 rng_{}; |
|
||
inline time_generator_v7::time_generator_v7() | ||
{ | ||
detail::random_provider seeder; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable seeder
is not initialized
detail::random_provider seeder; | |
detail::random_provider seeder = 0; |
rng_.seed( seeder ); | ||
} | ||
|
||
inline time_generator_v7::time_generator_v7( time_generator_v7 const& rhs ): state_( rhs.state_ ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructor does not initialize these fields: rng_
|
||
inline time_generator_v7::time_generator_v7( time_generator_v7 const& rhs ): state_( rhs.state_ ) | ||
{ | ||
detail::random_provider seeder; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable seeder
is not initialized
detail::random_provider seeder; | |
detail::random_provider seeder = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (8/35)
rng_.seed( seeder ); | ||
} | ||
|
||
inline time_generator_v7::time_generator_v7( time_generator_v7&& rhs ) noexcept: state_( std::move( rhs.state_ ) ), rng_( std::move( rhs.rng_ ) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructor does not initialize these fields: rng_
inline time_generator_v7::state_type time_generator_v7::get_new_state( state_type const& oldst ) noexcept | ||
{ | ||
// `now()` in microseconds | ||
std::uint64_t now_in_us = std::chrono::time_point_cast< std::chrono::microseconds >( std::chrono::system_clock::now() ).time_since_epoch().count(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable now_in_us
is not initialized
std::uint64_t now_in_us = std::chrono::time_point_cast< std::chrono::microseconds >( std::chrono::system_clock::now() ).time_since_epoch().count(); | |
std::uint64_t now_in_us = 0 = std::chrono::time_point_cast< std::chrono::microseconds >( std::chrono::system_clock::now() ).time_since_epoch().count(); |
|
||
inline time_generator_v7::result_type time_generator_v7::operator()() noexcept | ||
{ | ||
uuid result; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable result
is not initialized
uuid result; | |
uuid result = 0; |
return result; | ||
} | ||
|
||
}} // namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
not terminated with a closing comment
return result; | ||
} | ||
|
||
}} // namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with a comment that refers to a wrong namespace boost::uuids
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#include <boost/uuid/detail/basic_name_generator.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/detail/basic_name_generator.hpp
file not found
} | ||
}; | ||
|
||
} // uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
ends with an unrecognized comment
}; | ||
|
||
} // uuids | ||
} // boost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with an unrecognized comment
*/ | ||
class uuid_vx_version_impl { | ||
public: | ||
uuid_vx_version_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
uuid_vx_version_impl(mysqlpp::udf_context &ctx) { | |
explicit uuid_vx_version_impl(mysqlpp::udf_context &ctx) { |
try { | ||
boost::uuids::string_generator gen; | ||
auto uxs = ctx.get_arg<STRING_RESULT>(0); | ||
boost::uuids::uuid u = gen(uxs.data()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name u
is too short, expected at least 2 characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (9/35)
*/ | ||
class uuid_vx_variant_impl { | ||
public: | ||
uuid_vx_variant_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
uuid_vx_variant_impl(mysqlpp::udf_context &ctx) { | |
explicit uuid_vx_variant_impl(mysqlpp::udf_context &ctx) { |
try { | ||
boost::uuids::string_generator gen; | ||
auto uxs = ctx.get_arg<STRING_RESULT>(0); | ||
boost::uuids::uuid u = gen(uxs.data()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name u
is too short, expected at least 2 characters
*/ | ||
class is_uuid_vx_impl { | ||
public: | ||
is_uuid_vx_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
is_uuid_vx_impl(mysqlpp::udf_context &ctx) { | |
explicit is_uuid_vx_impl(mysqlpp::udf_context &ctx) { |
*/ | ||
class is_nil_uuid_vx_impl { | ||
public: | ||
is_nil_uuid_vx_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
is_nil_uuid_vx_impl(mysqlpp::udf_context &ctx) { | |
explicit is_nil_uuid_vx_impl(mysqlpp::udf_context &ctx) { |
try { | ||
boost::uuids::string_generator gen; | ||
auto uxs = ctx.get_arg<STRING_RESULT>(0); | ||
boost::uuids::uuid u = gen(uxs.data()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name u
is too short, expected at least 2 characters
public: | ||
static const boost::uuids::uuid max_uuid; | ||
|
||
is_max_uuid_vx_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
is_max_uuid_vx_impl(mysqlpp::udf_context &ctx) { | |
explicit is_max_uuid_vx_impl(mysqlpp::udf_context &ctx) { |
try { | ||
boost::uuids::string_generator gen; | ||
auto uxs = ctx.get_arg<STRING_RESULT>(0); | ||
boost::uuids::uuid u = gen(uxs.data()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name u
is too short, expected at least 2 characters
*/ | ||
class uuid_v1_impl { | ||
public: | ||
uuid_v1_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
uuid_v1_impl(mysqlpp::udf_context &ctx) { | |
explicit uuid_v1_impl(mysqlpp::udf_context &ctx) { |
*/ | ||
class string_based_uuid { | ||
public: | ||
inline boost::uuids::uuid get_uuid_namespace(int name_index) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method get_uuid_namespace
can be made static
inline boost::uuids::uuid get_uuid_namespace(int name_index) { | |
static inline boost::uuids::uuid get_uuid_namespace(int name_index) { |
*/ | ||
class uuid_v3_impl : string_based_uuid { | ||
public: | ||
uuid_v3_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
uuid_v3_impl(mysqlpp::udf_context &ctx) { | |
explicit uuid_v3_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (10/35)
} | ||
} | ||
boost::uuids::name_generator_md5 gen_v3(get_uuid_namespace(ns_index)); | ||
std::string s(the_string); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name s
is too short, expected at least 2 characters
*/ | ||
class uuid_v4_impl { | ||
public: | ||
uuid_v4_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
uuid_v4_impl(mysqlpp::udf_context &ctx) { | |
explicit uuid_v4_impl(mysqlpp::udf_context &ctx) { |
*/ | ||
class uuid_v5_impl : string_based_uuid { | ||
public: | ||
uuid_v5_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
uuid_v5_impl(mysqlpp::udf_context &ctx) { | |
explicit uuid_v5_impl(mysqlpp::udf_context &ctx) { |
} | ||
} | ||
boost::uuids::name_generator_sha1 gen_v5(get_uuid_namespace(ns_index)); | ||
std::string s(the_string); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name s
is too short, expected at least 2 characters
*/ | ||
class uuid_v6_impl { | ||
public: | ||
uuid_v6_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
uuid_v6_impl(mysqlpp::udf_context &ctx) { | |
explicit uuid_v6_impl(mysqlpp::udf_context &ctx) { |
*/ | ||
class uuid_v7_impl { | ||
public: | ||
uuid_v7_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
uuid_v7_impl(mysqlpp::udf_context &ctx) { | |
explicit uuid_v7_impl(mysqlpp::udf_context &ctx) { |
* ofs_ms argument is of type "long" so it will not cause integer overflow. | ||
* @return time-shifted UUID v7 | ||
*/ | ||
boost::uuids::uuid add_ts_offset(boost::uuids::uuid u, long ofs_ms) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method add_ts_offset
can be made static
boost::uuids::uuid add_ts_offset(boost::uuids::uuid u, long ofs_ms) { | |
static boost::uuids::uuid add_ts_offset(boost::uuids::uuid u, long ofs_ms) { |
* ofs_ms argument is of type "long" so it will not cause integer overflow. | ||
* @return time-shifted UUID v7 | ||
*/ | ||
boost::uuids::uuid add_ts_offset(boost::uuids::uuid u, long ofs_ms) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name u
is too short, expected at least 2 characters
*/ | ||
class nil_uuid_vx_impl { | ||
public: | ||
nil_uuid_vx_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
nil_uuid_vx_impl(mysqlpp::udf_context &ctx) { | |
explicit nil_uuid_vx_impl(mysqlpp::udf_context &ctx) { |
*/ | ||
class max_uuid_vx_impl { | ||
public: | ||
max_uuid_vx_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
max_uuid_vx_impl(mysqlpp::udf_context &ctx) { | |
explicit max_uuid_vx_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (11/35)
*/ | ||
class uuid_vx_to_bin_impl { | ||
public: | ||
uuid_vx_to_bin_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
uuid_vx_to_bin_impl(mysqlpp::udf_context &ctx) { | |
explicit uuid_vx_to_bin_impl(mysqlpp::udf_context &ctx) { |
return {}; | ||
} | ||
char result[uuid_size_in_bytes + 1]; | ||
boost::uuids::uuid u; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name u
is too short, expected at least 2 characters
try { | ||
u = gen(uxs.data()); | ||
for (size_t i = 0; i < uuid_size_in_bytes; i++) { | ||
result[i] = (uint8_t)u.data[i]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C-style casts are discouraged; use static_cast (if needed, the cast may be redundant)
result[i] = (uint8_t)u.data[i]; | |
result[i] = static_cast<uint8_t>(u.data[i]); |
*/ | ||
class bin_to_uuid_vx_impl { | ||
public: | ||
bin_to_uuid_vx_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
bin_to_uuid_vx_impl(mysqlpp::udf_context &ctx) { | |
explicit bin_to_uuid_vx_impl(mysqlpp::udf_context &ctx) { |
raise<std::invalid_argument>(err_msg_16bytes); | ||
} | ||
|
||
boost::uuids::uuid u; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name u
is too short, expected at least 2 characters
/** | ||
* Returns time in ms since epoch | ||
*/ | ||
inline u_int64_t get_ts(std::string_view uxs) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method get_ts
can be made static
inline u_int64_t get_ts(std::string_view uxs) { | |
static inline u_int64_t get_ts(std::string_view uxs) { |
*/ | ||
inline u_int64_t get_ts(std::string_view uxs) { | ||
boost::uuids::string_generator gen; | ||
boost::uuids::uuid u; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name u
is too short, expected at least 2 characters
* @return String timestamp representation tin the form like 2024-05-29 | ||
* 18:04:14.201 | ||
*/ | ||
inline std::string get_timestamp(uint64_t milliseconds) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method get_timestamp
can be made static
inline std::string get_timestamp(uint64_t milliseconds) { | |
static inline std::string get_timestamp(uint64_t milliseconds) { |
* @return String timestamp representation tin the form like Wed May 29 | ||
* 18:05:07 2024 GMT | ||
*/ | ||
inline std::string get_timestamp_with_tz(uint64_t milliseconds) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method get_timestamp_with_tz
can be made static
inline std::string get_timestamp_with_tz(uint64_t milliseconds) { | |
static inline std::string get_timestamp_with_tz(uint64_t milliseconds) { |
*/ | ||
class uuid_vx_to_timestamp_impl : timestamp_based_uuid { | ||
public: | ||
uuid_vx_to_timestamp_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
uuid_vx_to_timestamp_impl(mysqlpp::udf_context &ctx) { | |
explicit uuid_vx_to_timestamp_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (12/35)
*/ | ||
class uuid_vx_to_timestamp_tz_impl : timestamp_based_uuid { | ||
public: | ||
uuid_vx_to_timestamp_tz_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
uuid_vx_to_timestamp_tz_impl(mysqlpp::udf_context &ctx) { | |
explicit uuid_vx_to_timestamp_tz_impl(mysqlpp::udf_context &ctx) { |
*/ | ||
class uuid_vx_to_unixtime_impl : timestamp_based_uuid { | ||
public: | ||
uuid_vx_to_unixtime_impl(mysqlpp::udf_context &ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
uuid_vx_to_unixtime_impl(mysqlpp::udf_context &ctx) { | |
explicit uuid_vx_to_unixtime_impl(mysqlpp::udf_context &ctx) { |
|
||
} // namespace | ||
|
||
DECLARE_INT_UDF_AUTO(uuid_vx_version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable initid
is not initialized
|
||
} // namespace | ||
|
||
DECLARE_INT_UDF_AUTO(uuid_vx_version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter initid
is unused
} // namespace | ||
|
||
DECLARE_INT_UDF_AUTO(uuid_vx_version) | ||
DECLARE_INT_UDF_AUTO(uuid_vx_variant) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable initid
is not initialized
} // namespace | ||
|
||
DECLARE_INT_UDF_AUTO(uuid_vx_version) | ||
DECLARE_INT_UDF_AUTO(uuid_vx_variant) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter initid
is unused
|
||
DECLARE_INT_UDF_AUTO(uuid_vx_version) | ||
DECLARE_INT_UDF_AUTO(uuid_vx_variant) | ||
DECLARE_INT_UDF_AUTO(is_uuid_vx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable initid
is not initialized
|
||
DECLARE_INT_UDF_AUTO(uuid_vx_version) | ||
DECLARE_INT_UDF_AUTO(uuid_vx_variant) | ||
DECLARE_INT_UDF_AUTO(is_uuid_vx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter initid
is unused
DECLARE_INT_UDF_AUTO(uuid_vx_version) | ||
DECLARE_INT_UDF_AUTO(uuid_vx_variant) | ||
DECLARE_INT_UDF_AUTO(is_uuid_vx) | ||
DECLARE_INT_UDF_AUTO(is_nil_uuid_vx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable initid
is not initialized
DECLARE_INT_UDF_AUTO(uuid_vx_version) | ||
DECLARE_INT_UDF_AUTO(uuid_vx_variant) | ||
DECLARE_INT_UDF_AUTO(is_uuid_vx) | ||
DECLARE_INT_UDF_AUTO(is_nil_uuid_vx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter initid
is unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (13/35)
DECLARE_INT_UDF_AUTO(uuid_vx_variant) | ||
DECLARE_INT_UDF_AUTO(is_uuid_vx) | ||
DECLARE_INT_UDF_AUTO(is_nil_uuid_vx) | ||
DECLARE_INT_UDF_AUTO(is_max_uuid_vx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable initid
is not initialized
DECLARE_INT_UDF_AUTO(uuid_vx_variant) | ||
DECLARE_INT_UDF_AUTO(is_uuid_vx) | ||
DECLARE_INT_UDF_AUTO(is_nil_uuid_vx) | ||
DECLARE_INT_UDF_AUTO(is_max_uuid_vx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter initid
is unused
DECLARE_INT_UDF_AUTO(is_nil_uuid_vx) | ||
DECLARE_INT_UDF_AUTO(is_max_uuid_vx) | ||
// requires invoke of g++ with -latomic | ||
DECLARE_STRING_UDF_AUTO(uuid_v1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable initid
is not initialized
DECLARE_INT_UDF_AUTO(is_nil_uuid_vx) | ||
DECLARE_INT_UDF_AUTO(is_max_uuid_vx) | ||
// requires invoke of g++ with -latomic | ||
DECLARE_STRING_UDF_AUTO(uuid_v1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter initid
is unused
DECLARE_INT_UDF_AUTO(is_max_uuid_vx) | ||
// requires invoke of g++ with -latomic | ||
DECLARE_STRING_UDF_AUTO(uuid_v1) | ||
DECLARE_STRING_UDF_AUTO(uuid_v3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable initid
is not initialized
DECLARE_INT_UDF_AUTO(is_max_uuid_vx) | ||
// requires invoke of g++ with -latomic | ||
DECLARE_STRING_UDF_AUTO(uuid_v1) | ||
DECLARE_STRING_UDF_AUTO(uuid_v3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter initid
is unused
// requires invoke of g++ with -latomic | ||
DECLARE_STRING_UDF_AUTO(uuid_v1) | ||
DECLARE_STRING_UDF_AUTO(uuid_v3) | ||
DECLARE_STRING_UDF_AUTO(uuid_v4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable initid
is not initialized
// requires invoke of g++ with -latomic | ||
DECLARE_STRING_UDF_AUTO(uuid_v1) | ||
DECLARE_STRING_UDF_AUTO(uuid_v3) | ||
DECLARE_STRING_UDF_AUTO(uuid_v4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter initid
is unused
DECLARE_STRING_UDF_AUTO(uuid_v1) | ||
DECLARE_STRING_UDF_AUTO(uuid_v3) | ||
DECLARE_STRING_UDF_AUTO(uuid_v4) | ||
DECLARE_STRING_UDF_AUTO(uuid_v5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable initid
is not initialized
DECLARE_STRING_UDF_AUTO(uuid_v1) | ||
DECLARE_STRING_UDF_AUTO(uuid_v3) | ||
DECLARE_STRING_UDF_AUTO(uuid_v4) | ||
DECLARE_STRING_UDF_AUTO(uuid_v5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter initid
is unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (14/35)
DECLARE_STRING_UDF_AUTO(uuid_v4) | ||
DECLARE_STRING_UDF_AUTO(uuid_v5) | ||
// requires invoke of g++ with -latomic | ||
DECLARE_STRING_UDF_AUTO(uuid_v6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable initid
is not initialized
DECLARE_STRING_UDF_AUTO(uuid_v4) | ||
DECLARE_STRING_UDF_AUTO(uuid_v5) | ||
// requires invoke of g++ with -latomic | ||
DECLARE_STRING_UDF_AUTO(uuid_v6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter initid
is unused
DECLARE_STRING_UDF_AUTO(uuid_v5) | ||
// requires invoke of g++ with -latomic | ||
DECLARE_STRING_UDF_AUTO(uuid_v6) | ||
DECLARE_STRING_UDF_AUTO(uuid_v7) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable initid
is not initialized
DECLARE_STRING_UDF_AUTO(uuid_v5) | ||
// requires invoke of g++ with -latomic | ||
DECLARE_STRING_UDF_AUTO(uuid_v6) | ||
DECLARE_STRING_UDF_AUTO(uuid_v7) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter initid
is unused
// requires invoke of g++ with -latomic | ||
DECLARE_STRING_UDF_AUTO(uuid_v6) | ||
DECLARE_STRING_UDF_AUTO(uuid_v7) | ||
DECLARE_STRING_UDF_AUTO(nil_uuid_vx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable initid
is not initialized
// requires invoke of g++ with -latomic | ||
DECLARE_STRING_UDF_AUTO(uuid_v6) | ||
DECLARE_STRING_UDF_AUTO(uuid_v7) | ||
DECLARE_STRING_UDF_AUTO(nil_uuid_vx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter initid
is unused
DECLARE_STRING_UDF_AUTO(uuid_v6) | ||
DECLARE_STRING_UDF_AUTO(uuid_v7) | ||
DECLARE_STRING_UDF_AUTO(nil_uuid_vx) | ||
DECLARE_STRING_UDF_AUTO(max_uuid_vx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable initid
is not initialized
DECLARE_STRING_UDF_AUTO(uuid_v6) | ||
DECLARE_STRING_UDF_AUTO(uuid_v7) | ||
DECLARE_STRING_UDF_AUTO(nil_uuid_vx) | ||
DECLARE_STRING_UDF_AUTO(max_uuid_vx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter initid
is unused
DECLARE_STRING_UDF_AUTO(uuid_v7) | ||
DECLARE_STRING_UDF_AUTO(nil_uuid_vx) | ||
DECLARE_STRING_UDF_AUTO(max_uuid_vx) | ||
DECLARE_STRING_UDF_AUTO(uuid_vx_to_bin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable initid
is not initialized
DECLARE_STRING_UDF_AUTO(uuid_v7) | ||
DECLARE_STRING_UDF_AUTO(nil_uuid_vx) | ||
DECLARE_STRING_UDF_AUTO(max_uuid_vx) | ||
DECLARE_STRING_UDF_AUTO(uuid_vx_to_bin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter initid
is unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (15/35)
DECLARE_STRING_UDF_AUTO(nil_uuid_vx) | ||
DECLARE_STRING_UDF_AUTO(max_uuid_vx) | ||
DECLARE_STRING_UDF_AUTO(uuid_vx_to_bin) | ||
DECLARE_STRING_UDF_AUTO(bin_to_uuid_vx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable initid
is not initialized
DECLARE_STRING_UDF_AUTO(nil_uuid_vx) | ||
DECLARE_STRING_UDF_AUTO(max_uuid_vx) | ||
DECLARE_STRING_UDF_AUTO(uuid_vx_to_bin) | ||
DECLARE_STRING_UDF_AUTO(bin_to_uuid_vx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter initid
is unused
DECLARE_STRING_UDF_AUTO(max_uuid_vx) | ||
DECLARE_STRING_UDF_AUTO(uuid_vx_to_bin) | ||
DECLARE_STRING_UDF_AUTO(bin_to_uuid_vx) | ||
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable initid
is not initialized
DECLARE_STRING_UDF_AUTO(max_uuid_vx) | ||
DECLARE_STRING_UDF_AUTO(uuid_vx_to_bin) | ||
DECLARE_STRING_UDF_AUTO(bin_to_uuid_vx) | ||
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter initid
is unused
DECLARE_STRING_UDF_AUTO(uuid_vx_to_bin) | ||
DECLARE_STRING_UDF_AUTO(bin_to_uuid_vx) | ||
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp) | ||
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp_tz) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable initid
is not initialized
DECLARE_STRING_UDF_AUTO(uuid_vx_to_bin) | ||
DECLARE_STRING_UDF_AUTO(bin_to_uuid_vx) | ||
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp) | ||
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp_tz) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter initid
is unused
DECLARE_STRING_UDF_AUTO(bin_to_uuid_vx) | ||
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp) | ||
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp_tz) | ||
DECLARE_INT_UDF_AUTO(uuid_vx_to_unixtime) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable initid
is not initialized
DECLARE_STRING_UDF_AUTO(bin_to_uuid_vx) | ||
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp) | ||
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp_tz) | ||
DECLARE_INT_UDF_AUTO(uuid_vx_to_unixtime) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter initid
is unused
BEGIN_COMPONENT_PROVIDES(CURRENT_COMPONENT_NAME) | ||
END_COMPONENT_PROVIDES(); | ||
|
||
BEGIN_COMPONENT_REQUIRES(CURRENT_COMPONENT_NAME) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not use const_cast
END_COMPONENT_PROVIDES(); | ||
|
||
BEGIN_COMPONENT_REQUIRES(CURRENT_COMPONENT_NAME) | ||
REQUIRES_SERVICE(mysql_runtime_error), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not use const_cast
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (16/35)
|
||
BEGIN_COMPONENT_REQUIRES(CURRENT_COMPONENT_NAME) | ||
REQUIRES_SERVICE(mysql_runtime_error), | ||
REQUIRES_SERVICE(udf_registration), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not use const_cast
BEGIN_COMPONENT_REQUIRES(CURRENT_COMPONENT_NAME) | ||
REQUIRES_SERVICE(mysql_runtime_error), | ||
REQUIRES_SERVICE(udf_registration), | ||
REQUIRES_SERVICE(mysql_udf_metadata), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not use const_cast
// accompanying file LICENSE_1_0.txt or copy at | ||
// https://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#include <boost/uuid/namespaces.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/namespaces.hpp
file not found
|
||
uuid namespace_uuid_; | ||
|
||
private: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant access specifier has the same accessibility as the previous access specifier
private: |
{ | ||
private: | ||
|
||
uuid namespace_uuid_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructor does not initialize these fields: namespace_uuid_
uuid namespace_uuid_; | |
uuid namespace_uuid_{}; |
|
||
private: | ||
|
||
void process_characters( HashAlgo& hash, char const* p, std::size_t n ) const noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
// For portability, we convert all wide characters to uint32_t so that each | ||
// character is 4 bytes regardless of sizeof(wchar_t). | ||
|
||
void process_characters( HashAlgo& hash, wchar_t const* p, std::size_t n ) const noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
|
||
for( std::size_t i = 0; i < n; ++i) | ||
{ | ||
std::uint32_t ch = p[ i ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
signed char
to std::uint32_t
(aka unsigned int
) conversion; consider casting to unsigned char
first.
} | ||
} | ||
|
||
void process_characters( HashAlgo& hash, char32_t const* p, std::size_t n ) const noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
} | ||
} | ||
|
||
void process_characters( HashAlgo& hash, char16_t const* p, std::size_t n ) const noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (17/35)
|
||
BOOST_UUID_STATIC_ASSERT( sizeof(digest_type) >= 16 ); | ||
|
||
uuid u; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable u
is not initialized
uuid u; | |
uuid u = 0; |
|
||
BOOST_UUID_STATIC_ASSERT( sizeof(digest_type) >= 16 ); | ||
|
||
uuid u; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name u
is too short, expected at least 2 characters
}; | ||
|
||
} // namespace detail | ||
} // uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
ends with an unrecognized comment
|
||
} // namespace detail | ||
} // uuids | ||
} // boost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with an unrecognized comment
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#include <boost/uuid/uuid.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/uuid.hpp
file not found
|
||
inline uuid dns() noexcept | ||
{ | ||
uuid result = {{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable result
is not initialized
uuid result = {{ | |
uuid result = 0 = {{ |
|
||
inline uuid url() noexcept | ||
{ | ||
uuid result = {{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable result
is not initialized
uuid result = {{ | |
uuid result = 0 = {{ |
|
||
inline uuid oid() noexcept | ||
{ | ||
uuid result = {{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable result
is not initialized
uuid result = {{ | |
uuid result = 0 = {{ |
|
||
inline uuid x500dn() noexcept | ||
{ | ||
uuid result = {{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable result
is not initialized
uuid result = {{ | |
uuid result = 0 = {{ |
return result; | ||
} | ||
|
||
}}} // namespace boost::uuids::ns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace ns
not terminated with a closing comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (18/35)
return result; | ||
} | ||
|
||
}}} // namespace boost::uuids::ns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
not terminated with a closing comment
return result; | ||
} | ||
|
||
}}} // namespace boost::uuids::ns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with a comment that refers to a wrong namespace boost::uuids::ns
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#include <boost/uuid/uuid.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/uuid.hpp
file not found
return {{}}; | ||
} | ||
|
||
}} // namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
not terminated with a closing comment
return {{}}; | ||
} | ||
|
||
}} // namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with a comment that refers to a wrong namespace boost::uuids
|
||
#if defined(__GNUC__) || defined(__clang__) | ||
|
||
inline std::uint16_t byteswap( std::uint16_t x ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name x
is too short, expected at least 2 characters
return __builtin_bswap16( x ); | ||
} | ||
|
||
inline std::uint32_t byteswap( std::uint32_t x ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name x
is too short, expected at least 2 characters
return __builtin_bswap32( x ); | ||
} | ||
|
||
inline std::uint64_t byteswap( std::uint64_t x ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name x
is too short, expected at least 2 characters
|
||
#if defined(__SIZEOF_INT128__) | ||
|
||
inline __uint128_t byteswap( __uint128_t x ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name x
is too short, expected at least 2 characters
|
||
// load_*_u16 | ||
|
||
inline std::uint16_t load_native_u16( void const* p ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (19/35)
|
||
inline std::uint16_t load_native_u16( void const* p ) noexcept | ||
{ | ||
std::uint16_t tmp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable tmp
is not initialized
std::uint16_t tmp; | |
std::uint16_t tmp = 0; |
return tmp; | ||
} | ||
|
||
inline std::uint16_t load_little_u16( void const* p ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
|
||
inline std::uint16_t load_little_u16( void const* p ) noexcept | ||
{ | ||
std::uint16_t tmp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable tmp
is not initialized
std::uint16_t tmp; | |
std::uint16_t tmp = 0; |
#endif | ||
} | ||
|
||
inline std::uint16_t load_big_u16( void const* p ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
|
||
inline std::uint16_t load_big_u16( void const* p ) noexcept | ||
{ | ||
std::uint16_t tmp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable tmp
is not initialized
std::uint16_t tmp; | |
std::uint16_t tmp = 0; |
|
||
// load_*_u32 | ||
|
||
inline std::uint32_t load_native_u32( void const* p ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
|
||
inline std::uint32_t load_native_u32( void const* p ) noexcept | ||
{ | ||
std::uint32_t tmp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable tmp
is not initialized
std::uint32_t tmp; | |
std::uint32_t tmp = 0; |
return tmp; | ||
} | ||
|
||
inline std::uint32_t load_little_u32( void const* p ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
|
||
inline std::uint32_t load_little_u32( void const* p ) noexcept | ||
{ | ||
std::uint32_t tmp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable tmp
is not initialized
std::uint32_t tmp; | |
std::uint32_t tmp = 0; |
#endif | ||
} | ||
|
||
inline std::uint32_t load_big_u32( void const* p ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (20/35)
|
||
inline std::uint32_t load_big_u32( void const* p ) noexcept | ||
{ | ||
std::uint32_t tmp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable tmp
is not initialized
std::uint32_t tmp; | |
std::uint32_t tmp = 0; |
|
||
// load_*_u64 | ||
|
||
inline std::uint64_t load_native_u64( void const* p ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
|
||
inline std::uint64_t load_native_u64( void const* p ) noexcept | ||
{ | ||
std::uint64_t tmp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable tmp
is not initialized
std::uint64_t tmp; | |
std::uint64_t tmp = 0; |
return tmp; | ||
} | ||
|
||
inline std::uint64_t load_little_u64( void const* p ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
|
||
inline std::uint64_t load_little_u64( void const* p ) noexcept | ||
{ | ||
std::uint64_t tmp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable tmp
is not initialized
std::uint64_t tmp; | |
std::uint64_t tmp = 0; |
#endif | ||
} | ||
|
||
inline std::uint64_t load_big_u64( void const* p ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
|
||
inline std::uint64_t load_big_u64( void const* p ) noexcept | ||
{ | ||
std::uint64_t tmp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable tmp
is not initialized
std::uint64_t tmp; | |
std::uint64_t tmp = 0; |
|
||
#if defined(__SIZEOF_INT128__) | ||
|
||
inline __uint128_t load_native_u128( void const* p ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
|
||
inline __uint128_t load_native_u128( void const* p ) noexcept | ||
{ | ||
__uint128_t tmp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable tmp
is not initialized
__uint128_t tmp; | |
__uint128_t tmp = 0; |
return tmp; | ||
} | ||
|
||
inline __uint128_t load_little_u128( void const* p ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (21/35)
|
||
inline __uint128_t load_little_u128( void const* p ) noexcept | ||
{ | ||
__uint128_t tmp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable tmp
is not initialized
__uint128_t tmp; | |
__uint128_t tmp = 0; |
#endif | ||
} | ||
|
||
inline __uint128_t load_big_u128( void const* p ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
|
||
inline __uint128_t load_big_u128( void const* p ) noexcept | ||
{ | ||
__uint128_t tmp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable tmp
is not initialized
__uint128_t tmp; | |
__uint128_t tmp = 0; |
|
||
// store_*_u16 | ||
|
||
inline void store_native_u16( void* p, std::uint16_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
|
||
// store_*_u16 | ||
|
||
inline void store_native_u16( void* p, std::uint16_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name v
is too short, expected at least 2 characters
std::memcpy( p, &v, sizeof( v ) ); | ||
} | ||
|
||
inline void store_little_u16( void* p, std::uint16_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
std::memcpy( p, &v, sizeof( v ) ); | ||
} | ||
|
||
inline void store_little_u16( void* p, std::uint16_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name v
is too short, expected at least 2 characters
std::memcpy( p, &v, sizeof( v ) ); | ||
} | ||
|
||
inline void store_big_u16( void* p, std::uint16_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
std::memcpy( p, &v, sizeof( v ) ); | ||
} | ||
|
||
inline void store_big_u16( void* p, std::uint16_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name v
is too short, expected at least 2 characters
|
||
// store_*_u32 | ||
|
||
inline void store_native_u32( void* p, std::uint32_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (22/35)
|
||
// store_*_u32 | ||
|
||
inline void store_native_u32( void* p, std::uint32_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name v
is too short, expected at least 2 characters
std::memcpy( p, &v, sizeof( v ) ); | ||
} | ||
|
||
inline void store_little_u32( void* p, std::uint32_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
std::memcpy( p, &v, sizeof( v ) ); | ||
} | ||
|
||
inline void store_little_u32( void* p, std::uint32_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name v
is too short, expected at least 2 characters
std::memcpy( p, &v, sizeof( v ) ); | ||
} | ||
|
||
inline void store_big_u32( void* p, std::uint32_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
std::memcpy( p, &v, sizeof( v ) ); | ||
} | ||
|
||
inline void store_big_u32( void* p, std::uint32_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name v
is too short, expected at least 2 characters
|
||
// store_*_u64 | ||
|
||
inline void store_native_u64( void* p, std::uint64_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
|
||
// store_*_u64 | ||
|
||
inline void store_native_u64( void* p, std::uint64_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name v
is too short, expected at least 2 characters
std::memcpy( p, &v, sizeof( v ) ); | ||
} | ||
|
||
inline void store_little_u64( void* p, std::uint64_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
std::memcpy( p, &v, sizeof( v ) ); | ||
} | ||
|
||
inline void store_little_u64( void* p, std::uint64_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name v
is too short, expected at least 2 characters
std::memcpy( p, &v, sizeof( v ) ); | ||
} | ||
|
||
inline void store_big_u64( void* p, std::uint64_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (23/35)
std::memcpy( p, &v, sizeof( v ) ); | ||
} | ||
|
||
inline void store_big_u64( void* p, std::uint64_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name v
is too short, expected at least 2 characters
|
||
#if defined(__SIZEOF_INT128__) | ||
|
||
inline void store_native_u128( void* p, __uint128_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
|
||
#if defined(__SIZEOF_INT128__) | ||
|
||
inline void store_native_u128( void* p, __uint128_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name v
is too short, expected at least 2 characters
std::memcpy( p, &v, sizeof( v ) ); | ||
} | ||
|
||
inline void store_little_u128( void* p, __uint128_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
std::memcpy( p, &v, sizeof( v ) ); | ||
} | ||
|
||
inline void store_little_u128( void* p, __uint128_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name v
is too short, expected at least 2 characters
std::memcpy( p, &v, sizeof( v ) ); | ||
} | ||
|
||
inline void store_big_u128( void* p, __uint128_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name p
is too short, expected at least 2 characters
std::memcpy( p, &v, sizeof( v ) ); | ||
} | ||
|
||
inline void store_big_u128( void* p, __uint128_t v ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name v
is too short, expected at least 2 characters
|
||
#endif | ||
|
||
} // detail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace detail
ends with an unrecognized comment
#endif | ||
|
||
} // detail | ||
} // uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
ends with an unrecognized comment
|
||
} // detail | ||
} // uuids | ||
} // boost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with an unrecognized comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (24/35)
// accompanying file LICENSE_1_0.txt or copy at | ||
// https://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#include <boost/uuid/detail/endian.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/detail/endian.hpp
file not found
BOOST_UUID_STATIC_ASSERT(sizeof(unsigned char)*8 == 8); | ||
BOOST_UUID_STATIC_ASSERT(sizeof(unsigned int)*8 == 32); | ||
|
||
inline unsigned int left_rotate(unsigned int x, std::size_t n) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name x
is too short, expected at least 2 characters
|
||
typedef unsigned char digest_type[ 20 ]; | ||
|
||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant access specifier has the same accessibility as the previous access specifier
public: |
void process_block(); | ||
void process_byte_impl(unsigned char byte); | ||
|
||
private: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant access specifier has the same accessibility as the previous access specifier
private: |
|
||
private: | ||
|
||
unsigned int h_[5]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructor does not initialize these fields: h_, block_, block_byte_index_, bit_count_low, bit_count_high
unsigned int h_[5]; | |
unsigned int h_[5]{}; |
|
||
unsigned int h_[5]; | ||
|
||
unsigned char block_[64]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructor does not initialize these fields: h_, block_, block_byte_index_, bit_count_low, bit_count_high
unsigned char block_[64]; | |
unsigned char block_[64]{}; |
std::size_t block_byte_index_; | ||
std::size_t bit_count_low; | ||
std::size_t bit_count_high; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructor does not initialize these fields: h_, block_, block_byte_index_, bit_count_low, bit_count_high
std::size_t block_byte_index_; | |
std::size_t bit_count_low; | |
std::size_t bit_count_high; | |
std::size_t block_byte_index_{}; | |
std::size_t bit_count_low{}; | |
std::size_t bit_count_high{}; |
|
||
inline void sha1::process_bytes(void const* buffer, std::size_t byte_count) | ||
{ | ||
unsigned char const* b = static_cast<unsigned char const*>(buffer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name b
is too short, expected at least 2 characters
|
||
inline void sha1::process_block() | ||
{ | ||
unsigned int w[80]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name w
is too short, expected at least 2 characters
w[i] = left_rotate((w[i-3] ^ w[i-8] ^ w[i-14] ^ w[i-16]), 1); | ||
} | ||
|
||
unsigned int a = h_[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name a
is too short, expected at least 2 characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (25/35)
} | ||
|
||
unsigned int a = h_[0]; | ||
unsigned int b = h_[1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name b
is too short, expected at least 2 characters
|
||
unsigned int a = h_[0]; | ||
unsigned int b = h_[1]; | ||
unsigned int c = h_[2]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name c
is too short, expected at least 2 characters
unsigned int a = h_[0]; | ||
unsigned int b = h_[1]; | ||
unsigned int c = h_[2]; | ||
unsigned int d = h_[3]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name d
is too short, expected at least 2 characters
unsigned int b = h_[1]; | ||
unsigned int c = h_[2]; | ||
unsigned int d = h_[3]; | ||
unsigned int e = h_[4]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name e
is too short, expected at least 2 characters
unsigned int e = h_[4]; | ||
|
||
for (std::size_t i=0; i<80; ++i) { | ||
unsigned int f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable f
is not initialized
unsigned int f; | |
unsigned int f = 0; |
unsigned int e = h_[4]; | ||
|
||
for (std::size_t i=0; i<80; ++i) { | ||
unsigned int f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name f
is too short, expected at least 2 characters
|
||
for (std::size_t i=0; i<80; ++i) { | ||
unsigned int f; | ||
unsigned int k; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable k
is not initialized
unsigned int k; | |
unsigned int k = 0; |
|
||
for (std::size_t i=0; i<80; ++i) { | ||
unsigned int f; | ||
unsigned int k; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name k
is too short, expected at least 2 characters
detail::store_big_u32( digest + 16, h_[4] ); | ||
} | ||
|
||
}}} // namespace boost::uuids::detail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace detail
not terminated with a closing comment
detail::store_big_u32( digest + 16, h_[4] ); | ||
} | ||
|
||
}}} // namespace boost::uuids::detail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
not terminated with a closing comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (26/35)
detail::store_big_u32( digest + 16, h_[4] ); | ||
} | ||
|
||
}}} // namespace boost::uuids::detail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with a comment that refers to a wrong namespace boost::uuids::detail
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#include <boost/uuid/detail/random_device.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/detail/random_device.hpp
file not found
{ | ||
private: | ||
|
||
detail::random_device dev_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructor does not initialize these fields: dev_
detail::random_device dev_; | |
detail::random_device dev_{}; |
} | ||
} | ||
|
||
const char * name() const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method name
can be made static
const char * name() const | |
static const char * name() |
} | ||
}; | ||
|
||
} // detail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace detail
ends with an unrecognized comment
}; | ||
|
||
} // detail | ||
} // uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
ends with an unrecognized comment
|
||
} // detail | ||
} // uuids | ||
} // boost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with an unrecognized comment
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#include <boost/uuid/uuid.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/uuid.hpp
file not found
|
||
#endif | ||
|
||
template<class Ch> inline Ch* to_chars( uuid const& u, Ch* out ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter u
is unused
template<class Ch> inline Ch* to_chars( uuid const& u, Ch* out ) noexcept | |
template<class Ch> inline Ch* to_chars( uuid const& /*u*/, Ch* out ) noexcept |
|
||
#endif | ||
|
||
template<class Ch> inline Ch* to_chars( uuid const& u, Ch* out ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name u
is too short, expected at least 2 characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (27/35)
|
||
template<class Ch> inline Ch* to_chars( uuid const& u, Ch* out ) noexcept | ||
{ | ||
constexpr Ch const* p = digits( static_cast<Ch const*>( nullptr ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name p
is too short, expected at least 2 characters
} | ||
|
||
} // namespace detail | ||
}} //namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
not terminated with a closing comment
} | ||
|
||
} // namespace detail | ||
}} //namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with a comment that refers to a wrong namespace boost::uuids
// accompanying file LICENSE_1_0.txt or copy at | ||
// https://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#include <boost/uuid/name_generator_md5.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/name_generator_md5.hpp
file not found
// Only provided for compatibility with 1.85 and earlier | ||
using name_generator_latest = name_generator_sha1; | ||
|
||
} // uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
ends with an unrecognized comment
} // uuids | |
} // namespace uuids |
using name_generator_latest = name_generator_sha1; | ||
|
||
} // uuids | ||
} // boost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with an unrecognized comment
|
||
// prospector -p mul,xorr -t 1000 | ||
// score = 592.20293470138972 | ||
inline std::uint64_t hash_mix_mx( std::uint64_t x ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name x
is too short, expected at least 2 characters
// prospector -p mul:0xD96AAA55,xorr:16,mul,xorr -t 1000 | ||
// score = 79.5223047689704 | ||
// (with mx prepended) | ||
inline std::uint64_t hash_mix_fmx( std::uint64_t x ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name x
is too short, expected at least 2 characters
return x; | ||
} | ||
|
||
} // detail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace detail
ends with an unrecognized comment
} | ||
|
||
} // detail | ||
} // uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
ends with an unrecognized comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (28/35)
|
||
} // detail | ||
} // uuids | ||
} // boost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with an unrecognized comment
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#include <boost/uuid/detail/basic_name_generator.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/detail/basic_name_generator.hpp
file not found
} | ||
}; | ||
|
||
} // uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
ends with an unrecognized comment
}; | ||
|
||
} // uuids | ||
} // boost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with an unrecognized comment
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#include <boost/uuid/time_generator_v1.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/time_generator_v1.hpp
file not found
|
||
inline time_generator_v6::result_type time_generator_v6::operator()() noexcept | ||
{ | ||
uuid result = time_generator_v1::operator()(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable result
is not initialized
uuid result = time_generator_v1::operator()(); | |
uuid result = 0 = time_generator_v1::operator()(); |
{ | ||
uuid result = time_generator_v1::operator()(); | ||
|
||
std::uint64_t timestamp = result.timestamp_v1(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable timestamp
is not initialized
std::uint64_t timestamp = result.timestamp_v1(); | |
std::uint64_t timestamp = 0 = result.timestamp_v1(); |
|
||
std::uint64_t timestamp = result.timestamp_v1(); | ||
|
||
std::uint32_t time_high = static_cast< std::uint32_t >( timestamp >> 28 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable time_high
is not initialized
std::uint32_t time_high = static_cast< std::uint32_t >( timestamp >> 28 ); | |
std::uint32_t time_high = 0 = static_cast< std::uint32_t >( timestamp >> 28 ); |
|
||
detail::store_big_u32( result.data + 0, time_high ); | ||
|
||
std::uint16_t time_mid = static_cast< std::uint16_t >( timestamp >> 12 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable time_mid
is not initialized
std::uint16_t time_mid = static_cast< std::uint16_t >( timestamp >> 12 ); | |
std::uint16_t time_mid = 0 = static_cast< std::uint16_t >( timestamp >> 12 ); |
|
||
detail::store_big_u16( result.data + 4, time_mid ); | ||
|
||
std::uint16_t time_low_and_version = static_cast< std::uint16_t >( timestamp & 0xFFF ) | 0x6000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable time_low_and_version
is not initialized
std::uint16_t time_low_and_version = static_cast< std::uint16_t >( timestamp & 0xFFF ) | 0x6000; | |
std::uint16_t time_low_and_version = 0 = static_cast< std::uint16_t >( timestamp & 0xFFF ) | 0x6000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (29/35)
return result; | ||
} | ||
|
||
}} // namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
not terminated with a closing comment
return result; | ||
} | ||
|
||
}} // namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with a comment that refers to a wrong namespace boost::uuids
return tp.time_since_epoch().count(); | ||
} | ||
|
||
} // uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
ends with an unrecognized comment
} | ||
|
||
} // uuids | ||
} // boost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with an unrecognized comment
// accompanying file LICENSE_1_0.txt or copy at | ||
// https://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#include <boost/uuid/detail/numeric_cast.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/detail/numeric_cast.hpp
file not found
/* | ||
* The MD5 transformation for all four rounds. | ||
*/ | ||
#define BOOST_UUID_DETAIL_MD5_STEP(f, a, b, c, d, x, t, s) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function-like macro BOOST_UUID_DETAIL_MD5_STEP
used; consider a constexpr
template function
* their own translation unit avoids the problem. | ||
*/ | ||
#if defined(__i386__) || defined(__x86_64__) || defined(__vax__) | ||
#define BOOST_UUID_DETAIL_MD5_SET(n) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function-like macro BOOST_UUID_DETAIL_MD5_SET
used; consider a constexpr
template function
#if defined(__i386__) || defined(__x86_64__) || defined(__vax__) | ||
#define BOOST_UUID_DETAIL_MD5_SET(n) \ | ||
(memcpy(&ctx->block[(n)], &ptr[(n) * 4], sizeof(MD5_u32plus)), (ctx->block[(n)])) | ||
#define BOOST_UUID_DETAIL_MD5_GET(n) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function-like macro BOOST_UUID_DETAIL_MD5_GET
used; consider a constexpr
template function
memcpy(ctx->buffer, data, size); | ||
} | ||
|
||
#define BOOST_UUID_DETAIL_MD5_OUT(dst, src) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function-like macro BOOST_UUID_DETAIL_MD5_OUT
used; consider a constexpr
template function
}; | ||
|
||
|
||
} // detail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace detail
ends with an unrecognized comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (30/35)
|
||
|
||
} // detail | ||
} // uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
ends with an unrecognized comment
|
||
} // detail | ||
} // uuids | ||
} // boost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with an unrecognized comment
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#include <boost/uuid/uuid_clock.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/uuid_clock.hpp
file not found
|
||
public: | ||
|
||
operator repr_type& () noexcept { return repr_; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
operator unsigned char (&)[16]
must be marked explicit to avoid unintentional implicit conversions
operator repr_type& () noexcept { return repr_; } | |
explicit operator repr_type& () noexcept { return repr_; } |
public: | ||
|
||
operator repr_type& () noexcept { return repr_; } | ||
operator repr_type const& () const noexcept { return repr_; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
operator const unsigned char (&)[16]
must be marked explicit to avoid unintentional implicit conversions
operator repr_type const& () const noexcept { return repr_; } | |
explicit operator repr_type const& () const noexcept { return repr_; } |
|
||
data_type data; | ||
|
||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant access specifier has the same accessibility as the previous access specifier
public: |
|
||
uuid() = default; | ||
|
||
uuid( repr_type const& r ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single-argument constructors must be marked explicit to avoid unintentional implicit conversions
uuid( repr_type const& r ) | |
explicit uuid( repr_type const& r ) |
|
||
uuid() = default; | ||
|
||
uuid( repr_type const& r ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name r
is too short, expected at least 2 characters
|
||
// size | ||
|
||
constexpr size_type size() const noexcept { return static_size(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method size
can be made static
constexpr size_type size() const noexcept { return static_size(); } | |
static constexpr size_type size() noexcept { return static_size(); } |
unsigned char octet7 = data[8]; // octet 7 is array index 8 | ||
if ( (octet7 & 0x80) == 0x00 ) { // 0b0xxxxxxx | ||
return variant_ncs; | ||
} else if ( (octet7 & 0xC0) == 0x80 ) { // 0b10xxxxxx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not use else
after return
} else if ( (octet7 & 0xC0) == 0x80 ) { // 0b10xxxxxx | |
} if ( (octet7 & 0xC0) == 0x80 ) { // 0b10xxxxxx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (31/35)
std::uint8_t octet9 = data[6]; | ||
if ( (octet9 & 0xF0) == 0x10 ) { | ||
return version_time_based; | ||
} else if ( (octet9 & 0xF0) == 0x20 ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not use else
after return
} else if ( (octet9 & 0xF0) == 0x20 ) { | |
} if ( (octet9 & 0xF0) == 0x20 ) { |
|
||
using timestamp_type = std::uint64_t; | ||
|
||
timestamp_type timestamp_v1() const noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method timestamp_v1
can be made static
timestamp_type timestamp_v1() const noexcept | |
static timestamp_type timestamp_v1() noexcept |
|
||
timestamp_type timestamp_v1() const noexcept | ||
{ | ||
std::uint32_t time_low = detail::load_big_u32( this->data + 0 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable time_low
is not initialized
std::uint32_t time_low = detail::load_big_u32( this->data + 0 ); | |
std::uint32_t time_low = 0 = detail::load_big_u32( this->data + 0 ); |
timestamp_type timestamp_v1() const noexcept | ||
{ | ||
std::uint32_t time_low = detail::load_big_u32( this->data + 0 ); | ||
std::uint16_t time_mid = detail::load_big_u16( this->data + 4 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable time_mid
is not initialized
std::uint16_t time_mid = detail::load_big_u16( this->data + 4 ); | |
std::uint16_t time_mid = 0 = detail::load_big_u16( this->data + 4 ); |
{ | ||
std::uint32_t time_low = detail::load_big_u32( this->data + 0 ); | ||
std::uint16_t time_mid = detail::load_big_u16( this->data + 4 ); | ||
std::uint16_t time_hi = detail::load_big_u16( this->data + 6 ) & 0x0FFF; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable time_hi
is not initialized
std::uint16_t time_hi = detail::load_big_u16( this->data + 6 ) & 0x0FFF; | |
std::uint16_t time_hi = 0 = detail::load_big_u16( this->data + 6 ) & 0x0FFF; |
return time_low | static_cast<std::uint64_t>( time_mid ) << 32 | static_cast<std::uint64_t>( time_hi ) << 48; | ||
} | ||
|
||
timestamp_type timestamp_v6() const noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method timestamp_v6
can be made static
timestamp_type timestamp_v6() const noexcept | |
static timestamp_type timestamp_v6() noexcept |
|
||
timestamp_type timestamp_v6() const noexcept | ||
{ | ||
std::uint32_t time_high = detail::load_big_u32( this->data + 0 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable time_high
is not initialized
std::uint32_t time_high = detail::load_big_u32( this->data + 0 ); | |
std::uint32_t time_high = 0 = detail::load_big_u32( this->data + 0 ); |
timestamp_type timestamp_v6() const noexcept | ||
{ | ||
std::uint32_t time_high = detail::load_big_u32( this->data + 0 ); | ||
std::uint16_t time_mid = detail::load_big_u16( this->data + 4 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable time_mid
is not initialized
std::uint16_t time_mid = detail::load_big_u16( this->data + 4 ); | |
std::uint16_t time_mid = 0 = detail::load_big_u16( this->data + 4 ); |
{ | ||
std::uint32_t time_high = detail::load_big_u32( this->data + 0 ); | ||
std::uint16_t time_mid = detail::load_big_u16( this->data + 4 ); | ||
std::uint16_t time_low = detail::load_big_u16( this->data + 6 ) & 0x0FFF; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable time_low
is not initialized
std::uint16_t time_low = detail::load_big_u16( this->data + 6 ) & 0x0FFF; | |
std::uint16_t time_low = 0 = detail::load_big_u16( this->data + 6 ) & 0x0FFF; |
return time_low | static_cast<std::uint64_t>( time_mid ) << 12 | static_cast<std::uint64_t>( time_high ) << 28; | ||
} | ||
|
||
timestamp_type timestamp_v7() const noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method timestamp_v7
can be made static
timestamp_type timestamp_v7() const noexcept | |
static timestamp_type timestamp_v7() noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (32/35)
|
||
timestamp_type timestamp_v7() const noexcept | ||
{ | ||
std::uint64_t time_and_version = detail::load_big_u64( this->data + 0 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable time_and_version
is not initialized
std::uint64_t time_and_version = detail::load_big_u64( this->data + 0 ); | |
std::uint64_t time_and_version = 0 = detail::load_big_u64( this->data + 0 ); |
|
||
std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds> time_point_v7() const noexcept | ||
{ | ||
return std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds>( std::chrono::milliseconds( timestamp_v7() ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast
|
||
using node_type = std::array<std::uint8_t, 6>; | ||
|
||
node_type node_identifier() const noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method node_identifier
can be made static
node_type node_identifier() const noexcept | |
static node_type node_identifier() noexcept |
|
||
// hash_value | ||
|
||
inline std::size_t hash_value( uuid const& u ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name u
is too short, expected at least 2 characters
|
||
inline std::size_t hash_value( uuid const& u ) noexcept | ||
{ | ||
std::uint64_t r = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name r
is too short, expected at least 2 characters
return static_cast<std::size_t>( detail::hash_mix_fmx( r ) ); | ||
} | ||
|
||
}} //namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
not terminated with a closing comment
return static_cast<std::size_t>( detail::hash_mix_fmx( r ) ); | ||
} | ||
|
||
}} //namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with a comment that refers to a wrong namespace boost::uuids
namespace uuids { | ||
namespace detail { | ||
|
||
using std::random_device; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using decl random_device
is unused
|
||
using std::random_device; | ||
|
||
} // detail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace detail
ends with an unrecognized comment
} // detail | |
} // namespace detail |
using std::random_device; | ||
|
||
} // detail | ||
} // uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
ends with an unrecognized comment
} // uuids | |
} // namespace uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (33/35)
|
||
} // detail | ||
} // uuids | ||
} // boost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with an unrecognized comment
} // boost | |
} // namespace boost |
// accompanying file LICENSE_1_0.txt or copy at | ||
// https://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#include <boost/uuid/nil_generator.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/nil_generator.hpp
file not found
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#include <boost/uuid/uuid.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/uuid.hpp
file not found
|
||
inline time_generator_v1::time_generator_v1() | ||
{ | ||
detail::random_provider prov; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable prov
is not initialized
detail::random_provider prov; | |
detail::random_provider prov = 0; |
state_.clock_seq = static_cast<std::uint16_t>( tmp[ 2 ] & 0x3FFF ); | ||
} | ||
|
||
inline time_generator_v1::time_generator_v1( uuid::node_type const& node, state_type const& state ) noexcept: node_( node ), state_( state ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter node
is unused
inline time_generator_v1::time_generator_v1( uuid::node_type const& node, state_type const& state ) noexcept: node_( node ), state_( state ) | |
inline time_generator_v1::time_generator_v1( uuid::node_type const& /*node*/, state_type const& state ) noexcept: node_( node ), state_( state ) |
{ | ||
} | ||
|
||
inline time_generator_v1::time_generator_v1( uuid::node_type const& node, std::atomic<state_type>& state ) noexcept: node_( node ), ps_( &state ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter node
is unused
inline time_generator_v1::time_generator_v1( uuid::node_type const& node, std::atomic<state_type>& state ) noexcept: node_( node ), ps_( &state ) | |
inline time_generator_v1::time_generator_v1( uuid::node_type const& /*node*/, std::atomic<state_type>& state ) noexcept: node_( node ), ps_( &state ) |
{ | ||
state_type newst( oldst ); | ||
|
||
std::uint64_t timestamp = uuid_clock::now().time_since_epoch().count(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable timestamp
is not initialized
std::uint64_t timestamp = uuid_clock::now().time_since_epoch().count(); | |
std::uint64_t timestamp = 0 = uuid_clock::now().time_since_epoch().count(); |
|
||
inline time_generator_v1::result_type time_generator_v1::operator()() noexcept | ||
{ | ||
if( ps_ ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implicit conversion std::atomic<state_type> *
-> bool
if( ps_ ) | |
if( ps_ != nullptr ) |
state_ = get_new_state( state_ ); | ||
} | ||
|
||
uuid result; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable result
is not initialized
uuid result; | |
uuid result = 0; |
return result; | ||
} | ||
|
||
}} // namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
not terminated with a closing comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (34/35)
return result; | ||
} | ||
|
||
}} // namespace boost::uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with a comment that refers to a wrong namespace boost::uuids
// This header is only provided for compatibility with | ||
// Boost release 1.85 and earlier. | ||
|
||
#include <boost/uuid/detail/basic_name_generator.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/uuid/detail/basic_name_generator.hpp
file not found
// Only provided for compatibility with 1.85 | ||
using detail::basic_name_generator; | ||
|
||
} // uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
ends with an unrecognized comment
} // uuids | |
} // namespace uuids |
using detail::basic_name_generator; | ||
|
||
} // uuids | ||
} // boost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with an unrecognized comment
} // boost | |
} // namespace boost |
std::uint32_t block_[ 16 ]; | ||
std::size_t index_; | ||
|
||
private: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant access specifier has the same accessibility as the previous access specifier
private: |
|
||
private: | ||
|
||
static inline std::uint32_t rotl( std::uint32_t x, int n ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name x
is too short, expected at least 2 characters
return ( x << n ) | ( x >> (32 - n) ); | ||
} | ||
|
||
static inline void quarter_round( std::uint32_t (&x)[ 16 ], int a, int b, int c, int d ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name x
is too short, expected at least 2 characters
return ( x << n ) | ( x >> (32 - n) ); | ||
} | ||
|
||
static inline void quarter_round( std::uint32_t (&x)[ 16 ], int a, int b, int c, int d ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name a
is too short, expected at least 2 characters
return ( x << n ) | ( x >> (32 - n) ); | ||
} | ||
|
||
static inline void quarter_round( std::uint32_t (&x)[ 16 ], int a, int b, int c, int d ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name b
is too short, expected at least 2 characters
return ( x << n ) | ( x >> (32 - n) ); | ||
} | ||
|
||
static inline void quarter_round( std::uint32_t (&x)[ 16 ], int a, int b, int c, int d ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name c
is too short, expected at least 2 characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (35/35)
return ( x << n ) | ( x >> (32 - n) ); | ||
} | ||
|
||
static inline void quarter_round( std::uint32_t (&x)[ 16 ], int a, int b, int c, int d ) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter name d
is too short, expected at least 2 characters
std::uint32_t state_[ 16 ]; | ||
std::uint32_t block_[ 16 ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructor does not initialize these fields: state_, block_
std::uint32_t state_[ 16 ]; | |
std::uint32_t block_[ 16 ]; | |
std::uint32_t state_[ 16 ]{}; | |
std::uint32_t block_[ 16 ]{}; |
} | ||
} | ||
|
||
chacha20_12( std::uint32_t const (&key)[ 8 ], std::uint32_t const (&nonce)[ 2 ] ) noexcept: index_( 16 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructor does not initialize these fields: state_, block_
} | ||
}; | ||
|
||
}}} // namespace boost::uuids::detail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace detail
not terminated with a closing comment
} | ||
}; | ||
|
||
}}} // namespace boost::uuids::detail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
not terminated with a closing comment
} | ||
}; | ||
|
||
}}} // namespace boost::uuids::detail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with a comment that refers to a wrong namespace boost::uuids::detail
// Entropy error class | ||
// | ||
|
||
#include <boost/config.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boost/config.hpp
file not found
std::intmax_t m_errcode; | ||
}; | ||
|
||
} // uuids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace uuids
ends with an unrecognized comment
}; | ||
|
||
} // uuids | ||
} // boost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace boost
ends with an unrecognized comment
// Distributed under the Boost Software License, Version 1.0. | ||
// https://www.boost.org/LICENSE_1_0.txt | ||
|
||
#define BOOST_UUID_STATIC_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variadic macro BOOST_UUID_STATIC_ASSERT
used; consider using a constexpr
variadic template function
64b4541
to
4487017
Compare
https://perconadev.atlassian.net/browse/PS-9233
Implementation of UUID v1-v7 functions according to RFC 9562 and Boost UUID library added to support this implementation.