Skip to content

Commit a574294

Browse files
committed
Refactor progressCallback initialization and comments
Initialized progressCallback to nullptr and updated comments for clarity.
1 parent 4198602 commit a574294

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

libs/openFrameworks/utils/ofURLFileLoader.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,8 @@ class ofHttpRequest {
2323
std::string body; ///< POST body data
2424
std::string contentType; ///< POST data mime type
2525
std::function<void(const ofHttpResponse &)> done;
26-
/// Called with transfer progress in the range [0, 1] when the total size is known.
27-
/// For GET requests this reports download progress; for POST and PUT requests
28-
/// it reports upload progress. Asynchronous requests invoke this callback from
29-
/// the URL loader's worker thread.
30-
std::function<void(const ofHttpRequest &, float)> progressCallback;
26+
/// the URL loader's worker thread. range [0, 1]
27+
std::function<void(const ofHttpRequest &, float)> progressCallback = nullptr; // it reports upload/download progress. Asynchronous requests invoke this callback
3128
size_t timeoutSeconds = 0;
3229
bool headerOnly = false;
3330

0 commit comments

Comments
 (0)