YugabyteDB (2.13.0.0-b42, bfc6a6643e7399ac8a0e81d06a3ee6d6571b33ab)

Coverage Report

Created: 2022-03-09 17:30

/Users/deen/code/yugabyte-db/src/yb/gutil/strings/charset.cc
Line
Count
Source (jump to first uncovered line)
1
// Copyright 2008 Google Inc. All Rights Reserved.
2
//
3
// The following only applies to changes made to this file as part of YugaByte development.
4
//
5
// Portions Copyright (c) YugaByte, Inc.
6
//
7
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
8
// in compliance with the License.  You may obtain a copy of the License at
9
//
10
// http://www.apache.org/licenses/LICENSE-2.0
11
//
12
// Unless required by applicable law or agreed to in writing, software distributed under the License
13
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
14
// or implied.  See the License for the specific language governing permissions and limitations
15
// under the License.
16
//
17
18
#include "yb/gutil/strings/charset.h"
19
20
#include <string.h>
21
22
namespace strings {
23
24
0
CharSet::CharSet() {
25
0
  memset(this, 0, sizeof(*this));
26
0
}
27
28
0
CharSet::CharSet(const char* characters) {
29
0
  memset(this, 0, sizeof(*this));
30
0
  for (; *characters != '\0'; ++characters) {
31
0
    Add(*characters);
32
0
  }
33
0
}
34
35
0
CharSet::CharSet(const CharSet& other) {
36
0
  memcpy(this, &other, sizeof(*this));
37
0
}
38
39
}  // namespace strings