Ver a proveniência

Switch from C headers to C++ headers.

This CL makes the following substitutions.

* assert.h -> cassert
* math.h -> cmath
* stdarg.h -> cstdarg
* stddef.h -> cstddef
* stdint.h -> cstdint
* stdio.h -> cstdio
* stdlib.h -> cstdlib
* string.h -> cstring

PiperOrigin-RevId: 309080151
main
Victor Costan há 4 anos
ascendente
cometimento
3f934e3705
40 ficheiros alterados com 65 adições e 76 eliminações
  1. +3
    -2
      benchmarks/db_bench.cc
  2. +3
    -2
      benchmarks/db_bench_sqlite3.cc
  3. +3
    -2
      benchmarks/db_bench_tree_db.cc
  4. +2
    -3
      db/db_impl.cc
  5. +1
    -1
      db/db_iter.h
  6. +1
    -2
      db/dbformat.cc
  7. +1
    -1
      db/dumpfile.cc
  8. +2
    -2
      db/filename.cc
  9. +1
    -2
      db/filename.h
  10. +1
    -1
      db/leveldbutil.cc
  11. +1
    -1
      db/log_reader.cc
  12. +1
    -1
      db/log_reader.h
  13. +1
    -1
      db/log_writer.cc
  14. +1
    -1
      db/log_writer.h
  15. +1
    -2
      db/table_cache.h
  16. +1
    -2
      db/version_set.cc
  17. +1
    -2
      helpers/memenv/memenv.cc
  18. +1
    -1
      include/leveldb/cache.h
  19. +2
    -2
      include/leveldb/db.h
  20. +2
    -3
      include/leveldb/env.h
  21. +1
    -1
      include/leveldb/options.h
  22. +3
    -4
      include/leveldb/slice.h
  23. +1
    -1
      include/leveldb/table.h
  24. +1
    -1
      include/leveldb/table_builder.h
  25. +2
    -2
      table/block.h
  26. +1
    -2
      table/block_builder.cc
  27. +1
    -2
      table/block_builder.h
  28. +2
    -3
      table/filter_block.h
  29. +1
    -2
      table/format.h
  30. +1
    -1
      table/table_builder.cc
  31. +5
    -4
      util/cache.cc
  32. +2
    -2
      util/crc32c.cc
  33. +2
    -2
      util/crc32c.h
  34. +1
    -1
      util/hash.cc
  35. +2
    -2
      util/hash.h
  36. +2
    -2
      util/histogram.cc
  37. +3
    -5
      util/logging.cc
  38. +2
    -3
      util/logging.h
  39. +1
    -1
      util/random.h
  40. +1
    -1
      util/status.cc

+ 3
- 2
benchmarks/db_bench.cc Ver ficheiro

@ -2,10 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <cstdio>
#include <cstdlib>
#include "leveldb/cache.h"
#include "leveldb/db.h"
#include "leveldb/env.h"

+ 3
- 2
benchmarks/db_bench_sqlite3.cc Ver ficheiro

@ -3,8 +3,9 @@
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#include <sqlite3.h>
#include <stdio.h>
#include <stdlib.h>
#include <cstdio>
#include <cstdlib>
#include "util/histogram.h"
#include "util/random.h"

+ 3
- 2
benchmarks/db_bench_tree_db.cc Ver ficheiro

@ -3,8 +3,9 @@
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#include <kcpolydb.h>
#include <stdio.h>
#include <stdlib.h>
#include <cstdio>
#include <cstdlib>
#include "util/histogram.h"
#include "util/random.h"

+ 2
- 3
db/db_impl.cc Ver ficheiro

@ -4,11 +4,10 @@
#include "db/db_impl.h"
#include <stdint.h>
#include <stdio.h>
#include <algorithm>
#include <atomic>
#include <cstdint>
#include <cstdio>
#include <set>
#include <string>
#include <vector>

+ 1
- 1
db/db_iter.h Ver ficheiro

@ -5,7 +5,7 @@
#ifndef STORAGE_LEVELDB_DB_DB_ITER_H_
#define STORAGE_LEVELDB_DB_DB_ITER_H_
#include <stdint.h>
#include <cstdint>
#include "db/dbformat.h"
#include "leveldb/db.h"

+ 1
- 2
db/dbformat.cc Ver ficheiro

@ -4,8 +4,7 @@
#include "db/dbformat.h"
#include <stdio.h>
#include <cstdio>
#include <sstream>
#include "port/port.h"

+ 1
- 1
db/dumpfile.cc Ver ficheiro

@ -4,7 +4,7 @@
#include "leveldb/dumpfile.h"
#include <stdio.h>
#include <cstdio>
#include "db/dbformat.h"
#include "db/filename.h"

+ 2
- 2
db/filename.cc Ver ficheiro

@ -4,8 +4,8 @@
#include "db/filename.h"
#include <ctype.h>
#include <stdio.h>
#include <cassert>
#include <cstdio>
#include "db/dbformat.h"
#include "leveldb/env.h"

+ 1
- 2
db/filename.h Ver ficheiro

@ -7,8 +7,7 @@
#ifndef STORAGE_LEVELDB_DB_FILENAME_H_
#define STORAGE_LEVELDB_DB_FILENAME_H_
#include <stdint.h>
#include <cstdint>
#include <string>
#include "leveldb/slice.h"

+ 1
- 1
db/leveldbutil.cc Ver ficheiro

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#include <stdio.h>
#include <cstdio>
#include "leveldb/dumpfile.h"
#include "leveldb/env.h"

+ 1
- 1
db/log_reader.cc Ver ficheiro

@ -4,7 +4,7 @@
#include "db/log_reader.h"
#include <stdio.h>
#include <cstdio>
#include "leveldb/env.h"
#include "util/coding.h"

+ 1
- 1
db/log_reader.h Ver ficheiro

@ -5,7 +5,7 @@
#ifndef STORAGE_LEVELDB_DB_LOG_READER_H_
#define STORAGE_LEVELDB_DB_LOG_READER_H_
#include <stdint.h>
#include <cstdint>
#include "db/log_format.h"
#include "leveldb/slice.h"

+ 1
- 1
db/log_writer.cc Ver ficheiro

@ -4,7 +4,7 @@
#include "db/log_writer.h"
#include <stdint.h>
#include <cstdint>
#include "leveldb/env.h"
#include "util/coding.h"

+ 1
- 1
db/log_writer.h Ver ficheiro

@ -5,7 +5,7 @@
#ifndef STORAGE_LEVELDB_DB_LOG_WRITER_H_
#define STORAGE_LEVELDB_DB_LOG_WRITER_H_
#include <stdint.h>
#include <cstdint>
#include "db/log_format.h"
#include "leveldb/slice.h"

+ 1
- 2
db/table_cache.h Ver ficheiro

@ -7,8 +7,7 @@
#ifndef STORAGE_LEVELDB_DB_TABLE_CACHE_H_
#define STORAGE_LEVELDB_DB_TABLE_CACHE_H_
#include <stdint.h>
#include <cstdint>
#include <string>
#include "db/dbformat.h"

+ 1
- 2
db/version_set.cc Ver ficheiro

@ -4,9 +4,8 @@
#include "db/version_set.h"
#include <stdio.h>
#include <algorithm>
#include <cstdio>
#include "db/filename.h"
#include "db/log_reader.h"

+ 1
- 2
helpers/memenv/memenv.cc Ver ficheiro

@ -4,8 +4,7 @@
#include "helpers/memenv/memenv.h"
#include <string.h>
#include <cstring>
#include <limits>
#include <map>
#include <string>

+ 1
- 1
include/leveldb/cache.h Ver ficheiro

@ -18,7 +18,7 @@
#ifndef STORAGE_LEVELDB_INCLUDE_CACHE_H_
#define STORAGE_LEVELDB_INCLUDE_CACHE_H_
#include <stdint.h>
#include <cstdint>
#include "leveldb/export.h"
#include "leveldb/slice.h"

+ 2
- 2
include/leveldb/db.h Ver ficheiro

@ -5,8 +5,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_DB_H_
#define STORAGE_LEVELDB_INCLUDE_DB_H_
#include <stdint.h>
#include <stdio.h>
#include <cstdint>
#include <cstdio>
#include "leveldb/export.h"
#include "leveldb/iterator.h"

+ 2
- 3
include/leveldb/env.h Ver ficheiro

@ -13,9 +13,8 @@
#ifndef STORAGE_LEVELDB_INCLUDE_ENV_H_
#define STORAGE_LEVELDB_INCLUDE_ENV_H_
#include <stdarg.h>
#include <stdint.h>
#include <cstdarg>
#include <cstdint>
#include <string>
#include <vector>

+ 1
- 1
include/leveldb/options.h Ver ficheiro

@ -5,7 +5,7 @@
#ifndef STORAGE_LEVELDB_INCLUDE_OPTIONS_H_
#define STORAGE_LEVELDB_INCLUDE_OPTIONS_H_
#include <stddef.h>
#include <cstddef>
#include "leveldb/export.h"

+ 3
- 4
include/leveldb/slice.h Ver ficheiro

@ -15,10 +15,9 @@
#ifndef STORAGE_LEVELDB_INCLUDE_SLICE_H_
#define STORAGE_LEVELDB_INCLUDE_SLICE_H_
#include <assert.h>
#include <stddef.h>
#include <string.h>
#include <cassert>
#include <cstddef>
#include <cstring>
#include <string>
#include "leveldb/export.h"

+ 1
- 1
include/leveldb/table.h Ver ficheiro

@ -5,7 +5,7 @@
#ifndef STORAGE_LEVELDB_INCLUDE_TABLE_H_
#define STORAGE_LEVELDB_INCLUDE_TABLE_H_
#include <stdint.h>
#include <cstdint>
#include "leveldb/export.h"
#include "leveldb/iterator.h"

+ 1
- 1
include/leveldb/table_builder.h Ver ficheiro

@ -13,7 +13,7 @@
#ifndef STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_
#define STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_
#include <stdint.h>
#include <cstdint>
#include "leveldb/export.h"
#include "leveldb/options.h"

+ 2
- 2
table/block.h Ver ficheiro

@ -5,8 +5,8 @@
#ifndef STORAGE_LEVELDB_TABLE_BLOCK_H_
#define STORAGE_LEVELDB_TABLE_BLOCK_H_
#include <stddef.h>
#include <stdint.h>
#include <cstddef>
#include <cstdint>
#include "leveldb/iterator.h"

+ 1
- 2
table/block_builder.cc Ver ficheiro

@ -28,9 +28,8 @@
#include "table/block_builder.h"
#include <assert.h>
#include <algorithm>
#include <cassert>
#include "leveldb/comparator.h"
#include "leveldb/options.h"

+ 1
- 2
table/block_builder.h Ver ficheiro

@ -5,8 +5,7 @@
#ifndef STORAGE_LEVELDB_TABLE_BLOCK_BUILDER_H_
#define STORAGE_LEVELDB_TABLE_BLOCK_BUILDER_H_
#include <stdint.h>
#include <cstdint>
#include <vector>
#include "leveldb/slice.h"

+ 2
- 3
table/filter_block.h Ver ficheiro

@ -9,9 +9,8 @@
#ifndef STORAGE_LEVELDB_TABLE_FILTER_BLOCK_H_
#define STORAGE_LEVELDB_TABLE_FILTER_BLOCK_H_
#include <stddef.h>
#include <stdint.h>
#include <cstddef>
#include <cstdint>
#include <string>
#include <vector>

+ 1
- 2
table/format.h Ver ficheiro

@ -5,8 +5,7 @@
#ifndef STORAGE_LEVELDB_TABLE_FORMAT_H_
#define STORAGE_LEVELDB_TABLE_FORMAT_H_
#include <stdint.h>
#include <cstdint>
#include <string>
#include "leveldb/slice.h"

+ 1
- 1
table/table_builder.cc Ver ficheiro

@ -4,7 +4,7 @@
#include "leveldb/table_builder.h"
#include <assert.h>
#include <cassert>
#include "leveldb/comparator.h"
#include "leveldb/env.h"

+ 5
- 4
util/cache.cc Ver ficheiro

@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "leveldb/cache.h"
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include "port/port.h"
#include "port/thread_annotations.h"
#include "util/hash.h"

+ 2
- 2
util/crc32c.cc Ver ficheiro

@ -6,8 +6,8 @@
#include "util/crc32c.h"
#include <stddef.h>
#include <stdint.h>
#include <cstddef>
#include <cstdint>
#include "port/port.h"
#include "util/coding.h"

+ 2
- 2
util/crc32c.h Ver ficheiro

@ -5,8 +5,8 @@
#ifndef STORAGE_LEVELDB_UTIL_CRC32C_H_
#define STORAGE_LEVELDB_UTIL_CRC32C_H_
#include <stddef.h>
#include <stdint.h>
#include <cstddef>
#include <cstdint>
namespace leveldb {
namespace crc32c {

+ 1
- 1
util/hash.cc Ver ficheiro

@ -4,7 +4,7 @@
#include "util/hash.h"
#include <string.h>
#include <cstring>
#include "util/coding.h"

+ 2
- 2
util/hash.h Ver ficheiro

@ -7,8 +7,8 @@
#ifndef STORAGE_LEVELDB_UTIL_HASH_H_
#define STORAGE_LEVELDB_UTIL_HASH_H_
#include <stddef.h>
#include <stdint.h>
#include <cstddef>
#include <cstdint>
namespace leveldb {

+ 2
- 2
util/histogram.cc Ver ficheiro

@ -4,8 +4,8 @@
#include "util/histogram.h"
#include <math.h>
#include <stdio.h>
#include <cmath>
#include <cstdio>
#include "port/port.h"

+ 3
- 5
util/logging.cc Ver ficheiro

@ -4,11 +4,9 @@
#include "util/logging.h"
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <limits>
#include "leveldb/env.h"

+ 2
- 3
util/logging.h Ver ficheiro

@ -8,9 +8,8 @@
#ifndef STORAGE_LEVELDB_UTIL_LOGGING_H_
#define STORAGE_LEVELDB_UTIL_LOGGING_H_
#include <stdint.h>
#include <stdio.h>
#include <cstdint>
#include <cstdio>
#include <string>
#include "port/port.h"

+ 1
- 1
util/random.h Ver ficheiro

@ -5,7 +5,7 @@
#ifndef STORAGE_LEVELDB_UTIL_RANDOM_H_
#define STORAGE_LEVELDB_UTIL_RANDOM_H_
#include <stdint.h>
#include <cstdint>
namespace leveldb {

+ 1
- 1
util/status.cc Ver ficheiro

@ -4,7 +4,7 @@
#include "leveldb/status.h"
#include <stdio.h>
#include <cstdio>
#include "port/port.h"

Carregando…
Cancelar
Guardar