Procházet zdrojové kódy

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 před 4 roky
rodič
revize
3f934e3705
40 změnil soubory, kde provedl 65 přidání a 76 odebrání
  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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

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

+ 1
- 1
db/dumpfile.cc Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

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

+ 2
- 2
util/hash.h Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

@ -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 Zobrazit soubor

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

Načítá se…
Zrušit
Uložit