Home | History | Annotate | Download | only in src

Lines Matching full:default_value

102 // the given flag; if it's not set, returns default_value.
105 bool BoolFromEnv(const char* flag, bool default_value) {
108 return string_value == nullptr ? default_value : strcmp(string_value, "0") != 0;
113 // doesn't represent a valid 32-bit integer, returns default_value.
114 int32_t Int32FromEnv(const char* flag, int32_t default_value) {
119 return default_value;
122 int32_t result = default_value;
125 std::cout << "The default value " << default_value << " is used.\n";
126 return default_value;
133 // the given flag; if it's not set, returns default_value.
134 const char* StringFromEnv(const char* flag, const char* default_value) {
137 return value == nullptr ? default_value : value;