Replace NULL with nullptr
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
#include "stream_peer_gdnative.h"
|
||||
|
||||
StreamPeerGDNative::StreamPeerGDNative() {
|
||||
interface = NULL;
|
||||
interface = nullptr;
|
||||
}
|
||||
|
||||
StreamPeerGDNative::~StreamPeerGDNative() {
|
||||
@@ -45,27 +45,27 @@ void StreamPeerGDNative::_bind_methods() {
|
||||
}
|
||||
|
||||
Error StreamPeerGDNative::put_data(const uint8_t *p_data, int p_bytes) {
|
||||
ERR_FAIL_COND_V(interface == NULL, ERR_UNCONFIGURED);
|
||||
ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
|
||||
return (Error)(interface->put_data(interface->data, p_data, p_bytes));
|
||||
}
|
||||
|
||||
Error StreamPeerGDNative::put_partial_data(const uint8_t *p_data, int p_bytes, int &r_sent) {
|
||||
ERR_FAIL_COND_V(interface == NULL, ERR_UNCONFIGURED);
|
||||
ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
|
||||
return (Error)(interface->put_partial_data(interface->data, p_data, p_bytes, &r_sent));
|
||||
}
|
||||
|
||||
Error StreamPeerGDNative::get_data(uint8_t *p_buffer, int p_bytes) {
|
||||
ERR_FAIL_COND_V(interface == NULL, ERR_UNCONFIGURED);
|
||||
ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
|
||||
return (Error)(interface->get_data(interface->data, p_buffer, p_bytes));
|
||||
}
|
||||
|
||||
Error StreamPeerGDNative::get_partial_data(uint8_t *p_buffer, int p_bytes, int &r_received) {
|
||||
ERR_FAIL_COND_V(interface == NULL, ERR_UNCONFIGURED);
|
||||
ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
|
||||
return (Error)(interface->get_partial_data(interface->data, p_buffer, p_bytes, &r_received));
|
||||
}
|
||||
|
||||
int StreamPeerGDNative::get_available_bytes() const {
|
||||
ERR_FAIL_COND_V(interface == NULL, 0);
|
||||
ERR_FAIL_COND_V(interface == nullptr, 0);
|
||||
return interface->get_available_bytes(interface->data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user