Skip to content

Commit 118a968

Browse files
committed
Capitalize PRINT_VERBOSE macro to match other macros
1 parent 4248411 commit 118a968

File tree

121 files changed

+646
-646
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+646
-646
lines changed

core/debugger/remote_debugger_peer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,12 @@ Error RemoteDebuggerPeerTCP::connect_to_host(const String &p_host, uint16_t p_po
168168
for (int i = 0; i < tries; i++) {
169169
tcp_client->poll();
170170
if (tcp_client->get_status() == StreamPeerTCP::STATUS_CONNECTED) {
171-
print_verbose("Remote Debugger: Connected!");
171+
PRINT_VERBOSE("Remote Debugger: Connected!");
172172
break;
173173
} else {
174174
const int ms = waits[i];
175175
OS::get_singleton()->delay_usec(ms * 1000);
176-
print_verbose("Remote Debugger: Connection failed with status: '" + String::num_int64(tcp_client->get_status()) + "', retrying in " + String::num_int64(ms) + " msec.");
176+
PRINT_VERBOSE("Remote Debugger: Connection failed with status: '" + String::num_int64(tcp_client->get_status()) + "', retrying in " + String::num_int64(ms) + " msec.");
177177
}
178178
}
179179

core/input/input.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,7 +1633,7 @@ void Input::parse_mapping(const String &p_mapping) {
16331633
JoyButton output_button = _get_output_button(output);
16341634
JoyAxis output_axis = _get_output_axis(output);
16351635
if (output_button == JoyButton::INVALID && output_axis == JoyAxis::INVALID) {
1636-
print_verbose(vformat("Unrecognized output string \"%s\" in mapping:\n%s", output, p_mapping));
1636+
PRINT_VERBOSE(vformat("Unrecognized output string \"%s\" in mapping:\n%s", output, p_mapping));
16371637
continue;
16381638
}
16391639
ERR_CONTINUE_MSG(output_button != JoyButton::INVALID && output_axis != JoyAxis::INVALID,
@@ -1870,7 +1870,7 @@ Input::Input() {
18701870
continue;
18711871
}
18721872

1873-
print_verbose(vformat("Device Ignored -- Vendor: %s Product: %s", vid_pid[0], vid_pid[1]));
1873+
PRINT_VERBOSE(vformat("Device Ignored -- Vendor: %s Product: %s", vid_pid[0], vid_pid[1]));
18741874
const uint16_t vid_unswapped = vid_pid[0].hex_to_int();
18751875
const uint16_t pid_unswapped = vid_pid[1].hex_to_int();
18761876
const uint16_t vid = BSWAP16(vid_unswapped);

core/io/file_access_pack.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ bool PackedSourcePCK::try_open_pack(const String &p_path, bool p_replace_files,
217217
magic = f->get_32();
218218
if (magic == PACK_HEADER_MAGIC) {
219219
#ifdef DEBUG_ENABLED
220-
print_verbose("PCK header found in executable pck section, loading from offset 0x" + String::num_int64(pck_off - 4, 16));
220+
PRINT_VERBOSE("PCK header found in executable pck section, loading from offset 0x" + String::num_int64(pck_off - 4, 16));
221221
#endif
222222
pck_header_found = true;
223223
break;
@@ -245,7 +245,7 @@ bool PackedSourcePCK::try_open_pack(const String &p_path, bool p_replace_files,
245245
magic = f->get_32();
246246
if (magic == PACK_HEADER_MAGIC) {
247247
#ifdef DEBUG_ENABLED
248-
print_verbose("PCK header found at the end of executable, loading from offset 0x" + String::num_int64(f->get_position() - 4, 16));
248+
PRINT_VERBOSE("PCK header found at the end of executable, loading from offset 0x" + String::num_int64(f->get_position() - 4, 16));
249249
#endif
250250
pck_header_found = true;
251251
}

core/io/remote_filesystem_client.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Error RemoteFilesystemClient::_synchronize_with_server(const String &p_host, int
152152

153153
IPAddress ip = p_host.is_valid_ip_address() ? IPAddress(p_host) : IP::get_singleton()->resolve_hostname(p_host);
154154
ERR_FAIL_COND_V_MSG(!ip.is_valid(), ERR_INVALID_PARAMETER, vformat("Unable to resolve remote filesystem server hostname: '%s'.", p_host));
155-
print_verbose(vformat("Remote Filesystem: Connecting to host %s, port %d.", ip, p_port));
155+
PRINT_VERBOSE(vformat("Remote Filesystem: Connecting to host %s, port %d.", ip, p_port));
156156
Error err = tcp_client->connect_to_host(ip, p_port);
157157
ERR_FAIL_COND_V_MSG(err != OK, err, vformat("Unable to open connection to remote file server (%s, port %d) failed.", String(p_host), p_port));
158158

@@ -166,17 +166,17 @@ Error RemoteFilesystemClient::_synchronize_with_server(const String &p_host, int
166166
}
167167

168168
// Connection OK, now send the current file state.
169-
print_verbose("Remote Filesystem: Connection OK.");
169+
PRINT_VERBOSE("Remote Filesystem: Connection OK.");
170170

171171
// Header (GRFS) - Godot Remote File System
172-
print_verbose("Remote Filesystem: Sending header");
172+
PRINT_VERBOSE("Remote Filesystem: Sending header");
173173
tcp_client->put_u8('G');
174174
tcp_client->put_u8('R');
175175
tcp_client->put_u8('F');
176176
tcp_client->put_u8('S');
177177
// Protocol version
178178
tcp_client->put_32(FILESYSTEM_PROTOCOL_VERSION);
179-
print_verbose("Remote Filesystem: Sending password");
179+
PRINT_VERBOSE("Remote Filesystem: Sending password");
180180
uint8_t password[PASSWORD_LENGTH]; // Send fixed size password, since it's easier and safe to validate.
181181
for (int i = 0; i < PASSWORD_LENGTH; i++) {
182182
if (i < p_password.length()) {
@@ -186,7 +186,7 @@ Error RemoteFilesystemClient::_synchronize_with_server(const String &p_host, int
186186
}
187187
}
188188
tcp_client->put_data(password, PASSWORD_LENGTH);
189-
print_verbose("Remote Filesystem: Tags.");
189+
PRINT_VERBOSE("Remote Filesystem: Tags.");
190190
Vector<String> tags;
191191
{
192192
tags.push_back(OS::get_singleton()->get_identifier());
@@ -207,7 +207,7 @@ Error RemoteFilesystemClient::_synchronize_with_server(const String &p_host, int
207207
tcp_client->put_utf8_string(tags[i]);
208208
}
209209
// Size of compressed list of files
210-
print_verbose("Remote Filesystem: Sending file list");
210+
PRINT_VERBOSE("Remote Filesystem: Sending file list");
211211

212212
Vector<FileCache> file_cache = _load_cache_file();
213213

@@ -306,7 +306,7 @@ Error RemoteFilesystemClient::_synchronize_with_server(const String &p_host, int
306306
new_file_cache.push_back(fc);
307307
}
308308

309-
print_verbose("Remote Filesystem: Updating the cache file.");
309+
PRINT_VERBOSE("Remote Filesystem: Updating the cache file.");
310310

311311
// Go through the list of local files read initially (file_cache) and see which ones are
312312
// unchanged (not sent again from the server).
@@ -322,7 +322,7 @@ Error RemoteFilesystemClient::_synchronize_with_server(const String &p_host, int
322322
err = _store_cache_file(new_file_cache);
323323
ERR_FAIL_COND_V_MSG(err != OK, ERR_FILE_CANT_OPEN, "Error writing the remote filesystem file cache.");
324324

325-
print_verbose("Remote Filesystem: Update success.");
325+
PRINT_VERBOSE("Remote Filesystem: Update success.");
326326

327327
_update_cache_path(r_cache_path);
328328
return OK;

core/io/resource_importer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Error ResourceFormatImporter::_get_path_and_type(const String &p_path, PathAndTy
7878
err = VariantParser::parse_tag_assign_eof(&stream, lines, error_text, next_tag, assign, value, nullptr, true);
7979
if (err == ERR_FILE_EOF) {
8080
if (p_load && !path_found && decomp_path_found) {
81-
print_verbose(vformat("No natively supported texture format found for %s, using decompressable format %s.", p_path, decomp_path));
81+
PRINT_VERBOSE(vformat("No natively supported texture format found for %s, using decompressable format %s.", p_path, decomp_path));
8282
r_path_and_type.path = decomp_path;
8383
}
8484

core/io/resource_loader.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ Ref<Resource> ResourceLoader::_load(const String &p_path, const String &p_origin
302302
}
303303
load_paths_stack.push_back(original_path);
304304

305-
print_verbose(vformat("Loading resource: %s", p_path));
305+
PRINT_VERBOSE(vformat("Loading resource: %s", p_path));
306306

307307
// Try all loaders and pick the first match for the type hint
308308
bool found = false;
@@ -325,7 +325,7 @@ Ref<Resource> ResourceLoader::_load(const String &p_path, const String &p_origin
325325
if (res.is_valid()) {
326326
return res;
327327
} else {
328-
print_verbose(vformat("Failed loading resource: %s", p_path));
328+
PRINT_VERBOSE(vformat("Failed loading resource: %s", p_path));
329329
}
330330

331331
#ifdef TOOLS_ENABLED
@@ -522,7 +522,7 @@ Error ResourceLoader::load_threaded_request(const String &p_path, const String &
522522
ResourceLoader::LoadToken *ResourceLoader::_load_threaded_request_reuse_user_token(const String &p_path) {
523523
HashMap<String, LoadToken *>::Iterator E = user_load_tokens.find(p_path);
524524
if (E) {
525-
print_verbose("load_threaded_request(): Another threaded load for resource path '" + p_path + "' has been initiated. Not an error.");
525+
PRINT_VERBOSE("load_threaded_request(): Another threaded load for resource path '" + p_path + "' has been initiated. Not an error.");
526526
LoadToken *token = E->value;
527527
token->user_rc++;
528528
return token;
@@ -692,7 +692,7 @@ ResourceLoader::ThreadLoadStatus ResourceLoader::load_threaded_get_status(const
692692
MutexLock thread_load_lock(thread_load_mutex);
693693

694694
if (!user_load_tokens.has(p_path)) {
695-
print_verbose("load_threaded_get_status(): No threaded load for resource path '" + p_path + "' has been initiated or its result has already been collected.");
695+
PRINT_VERBOSE("load_threaded_get_status(): No threaded load for resource path '" + p_path + "' has been initiated or its result has already been collected.");
696696
return THREAD_LOAD_INVALID_RESOURCE;
697697
}
698698

@@ -733,7 +733,7 @@ Ref<Resource> ResourceLoader::load_threaded_get(const String &p_path, Error *r_e
733733
MutexLock thread_load_lock(thread_load_mutex);
734734

735735
if (!user_load_tokens.has(p_path)) {
736-
print_verbose("load_threaded_get(): No threaded load for resource path '" + p_path + "' has been initiated or its result has already been collected.");
736+
PRINT_VERBOSE("load_threaded_get(): No threaded load for resource path '" + p_path + "' has been initiated or its result has already been collected.");
737737
if (r_error) {
738738
*r_error = ERR_INVALID_PARAMETER;
739739
}

core/object/worker_thread_pool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ void WorkerThreadPool::init(int p_thread_count, float p_low_priority_task_ratio)
776776

777777
max_low_priority_threads = CLAMP(p_thread_count * p_low_priority_task_ratio, 1, p_thread_count - 1);
778778

779-
print_verbose(vformat("WorkerThreadPool: %d threads, %d max low-priority.", p_thread_count, max_low_priority_threads));
779+
PRINT_VERBOSE(vformat("WorkerThreadPool: %d threads, %d max low-priority.", p_thread_count, max_low_priority_threads));
780780

781781
threads.resize(p_thread_count);
782782

core/string/print_string.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ extern void print_error(const String &p_string);
6161
extern bool is_print_verbose_enabled();
6262

6363
// This version avoids processing the text to be printed until it actually has to be printed, saving some CPU usage.
64-
#define print_verbose(m_text) \
64+
#define PRINT_VERBOSE(m_text) \
6565
{ \
6666
if (is_print_verbose_enabled()) { \
6767
print_line(m_text); \

core/string/string_name.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void StringName::cleanup() {
126126
}
127127
}
128128
if (lost_strings) {
129-
print_verbose(vformat("StringName: %d unclaimed string names at exit.", lost_strings));
129+
PRINT_VERBOSE(vformat("StringName: %d unclaimed string names at exit.", lost_strings));
130130
}
131131
configured = false;
132132
}

core/variant/variant_utility.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ void VariantUtilityFunctions::_print_verbose(const Variant **p_args, int p_arg_c
10121012
}
10131013
}
10141014

1015-
// No need to use `print_verbose()` as this call already only happens
1015+
// No need to use `PRINT_VERBOSE()` as this call already only happens
10161016
// when verbose mode is enabled. This avoids performing string argument concatenation
10171017
// when not needed.
10181018
print_line(s);

0 commit comments

Comments
 (0)