Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <cctype>

namespace YAML {
static const char encoding[] =
static constexpr char encoding[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

std::string EncodeBase64(const unsigned char *data, std::size_t size) {
Expand Down Expand Up @@ -44,7 +44,7 @@ std::string EncodeBase64(const unsigned char *data, std::size_t size) {
return ret;
}

static const unsigned char decoding[] = {
static constexpr unsigned char decoding[] = {
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255,
Expand Down
4 changes: 2 additions & 2 deletions src/convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ bool convert<bool>::decode(const Node& node, bool& rhs) {
// we can't use iostream bool extraction operators as they don't
// recognize all possible values in the table below (taken from
// http://yaml.org/type/bool.html)
static const struct {
std::string truename, falsename;
static constexpr struct {
const char *truename, *falsename;
} names[] = {
{"y", "n"},
{"yes", "no"},
Expand Down
2 changes: 1 addition & 1 deletion src/emitterutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ std::pair<uint16_t, uint16_t> EncodeUTF16SurrogatePair(int codePoint) {
}

void WriteDoubleQuoteEscapeSequence(ostream_wrapper& out, int codePoint, StringEscaping::value stringEscapingStyle) {
static const char hexDigits[] = "0123456789abcdef";
static constexpr char hexDigits[] = "0123456789abcdef";

out << "\\";
int digits = 8;
Expand Down