Mercurial > libbase64
changeset 9:24e675edeab8
Remove bitbucket-pipelines.yml
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 02 Jan 2017 20:34:34 +0100 |
parents | fe34398e825b |
children | cb2b9e070024 |
files | CMakeLists.txt base64.hpp bitbucket-pipelines.yml |
diffstat | 3 files changed, 10 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Tue Oct 25 20:52:34 2016 +0200 +++ b/CMakeLists.txt Mon Jan 02 20:34:34 2017 +0100 @@ -22,10 +22,10 @@ set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED On) -set(BASE64_VERSION_MAJOR "1") +set(BASE64_VERSION_MAJOR "2") set(BASE64_VERSION_MINOR "0") set(BASE64_VERSION_PATCH "0") -set(BASE64_VERSION "${BASE64_VERSION_MAJOR}.${BASE64_VERSION_MINOR}.${BASE64_VERSION_PATCH}") +set(BASE64_VERSION "${BASE64_VERSION_MAJOR}.${BASE64_VERSION_MINOR}.${BASE64_VERSION_PATCH}-dev") find_package(Doxygen QUIET)
--- a/base64.hpp Tue Oct 25 20:52:34 2016 +0200 +++ b/base64.hpp Mon Jan 02 20:34:34 2017 +0100 @@ -23,7 +23,7 @@ * \file base64.hpp * \brief Base64 encoding and decoding. * \author David Demelier <markand@malikania.fr> - * \version 1.0.0 + * \version 2.0.0-dev */ /** @@ -70,7 +70,7 @@ * \param ch the character to test * \return true if valid */ -inline bool isBase64(char ch) noexcept +inline bool is_base64(char ch) noexcept { return std::isalnum(ch) != 0 || ch == '+' || ch == '/'; } @@ -82,9 +82,9 @@ * \param ch the character * \return true if the character is valid */ -inline bool isValid(char ch) noexcept +inline bool is_valid(char ch) noexcept { - return isBase64(ch) || ch == '='; + return is_base64(ch) || ch == '='; } /** @@ -106,7 +106,7 @@ /** * Get the integer value from the %base64 character. * - * \pre isBase64(ch) + * \pre is_base64(ch) * \param ch the %base64 character * \return the integer value for the %base64 character ch * ```` @@ -115,7 +115,7 @@ */ inline unsigned char rlookup(char ch) noexcept { - assert(isBase64(ch)); + assert(is_base64(ch)); if (ch >= '0' && ch <= '9') return static_cast<unsigned char>(ch + 4); @@ -180,9 +180,9 @@ for (count = 0; count < 4 && input != end; ++count) { // Check if the character is valid and get its value. - if ((*input == '=' && count <= 1) || !isValid(*input)) + if ((*input == '=' && count <= 1) || !is_valid(*input)) throw std::invalid_argument("invalid base64 string"); - if (isBase64(*input)) + if (is_base64(*input)) inputbuf[count] = static_cast<char>(rlookup(*input)); input++;
--- a/bitbucket-pipelines.yml Tue Oct 25 20:52:34 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -image: ubuntu:16.10 - -pipelines: - default: - - step: - script: - - apt-get -y update - - apt-get -y install cmake g++ - - cmake . -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-Wall -Wextra -pedantic" - - make - - make test \ No newline at end of file