Commit 581e3369 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Avoid uses of gflags integer aliases

Summary: [Folly] Avoid uses of gflags integer aliases, preferring std integer aliases.

Reviewed By: WillerZ, vitaut

Differential Revision: D20204609

fbshipit-source-id: e00b183ab2574af7ea064b9602f1ab8efced50b0
parent 9d9dad16
......@@ -17,7 +17,7 @@
/*
* AtomicHashMap --
*
* A high-performance concurrent hash map with int32 or int64 keys. Supports
* A high-performance concurrent hash map with int32_t or int64_t keys. Supports
* insert, find(key), findAt(index), erase(key), size, and more. Memory cannot
* be freed or reclaimed by erase. Can grow to a maximum of about 18 times the
* initial capacity, but performance degrades linearly with growth. Can also be
......@@ -35,7 +35,7 @@
* (see findAt()).
*
* Disadvantages:
* - Keys must be native int32 or int64, or explicitly converted.
* - Keys must be native int32_t or int64_t, or explicitly converted.
* - Must be able to specify unique empty, locked, and erased keys
* - Performance degrades linearly as size grows beyond initialization
* capacity.
......@@ -64,7 +64,7 @@
* of the map is exceeded.
*
* Benchmark performance with 8 simultaneous threads processing 1 million
* unique <int64, int64> entries on a 4-core, 2.5 GHz machine:
* unique <int64_t, int64_t> entries on a 4-core, 2.5 GHz machine:
*
* Load Factor Mem Efficiency usec/Insert usec/Find
* 50% 50% 0.19 0.05
......
......@@ -449,7 +449,7 @@ inline uint32_t digits10(uint64_t v) {
* Copies the ASCII base 10 representation of v into buffer and
* returns the number of bytes written. Does NOT append a \0. Assumes
* the buffer points to digits10(v) bytes of valid memory. Note that
* uint64 needs at most 20 bytes, uint32_t needs at most 10 bytes,
* uint64_t needs at most 20 bytes, uint32_t needs at most 10 bytes,
* uint16_t needs at most 5 bytes, and so on. Measurements suggest
* that defining a separate overload for 32-bit integers is not
* worthwhile.
......
......@@ -125,7 +125,7 @@ One particularly sensitive topic about handling C++ values is
that they are all conservatively considered <i>non-
relocatable</i>. In contrast, a relocatable value would preserve
its invariant even if its bits were moved arbitrarily in memory.
For example, an `int32` is relocatable because moving its 4 bytes
For example, an `int32_t` is relocatable because moving its 4 bytes
would preserve its actual value, so the address of that value
does not "matter" to its integrity.
......
......@@ -55,7 +55,7 @@ void BridgeFromGoogleLogging::send(
const struct ::tm* pTime,
const char* message,
size_t message_len,
::gflags::int32 usecs) {
int32_t usecs) {
struct ::tm time = *pTime;
folly::Logger const logger{full_filename};
auto follyLevel = asFollyLogLevel(severity);
......
......@@ -17,6 +17,8 @@
#pragma once
#define GLOG_NO_ABBREVIATED_SEVERITIES
#include <cstdint>
#include <glog/logging.h>
namespace folly {
......@@ -42,7 +44,7 @@ struct BridgeFromGoogleLogging : ::google::LogSink {
const struct ::tm* pTime,
const char* message,
size_t message_len,
::google::int32 usecs);
int32_t usecs);
void send(
::google::LogSeverity severity,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment