summaryrefslogtreecommitdiff
path: root/modules/mono/utils
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-18 11:27:04 +0100
committerGitHub <noreply@github.com>2020-02-18 11:27:04 +0100
commitef5891091bceef2800b4fae4cd85af219e791467 (patch)
tree8d58cca8cae2c34d408450cfb5ceb198543147b7 /modules/mono/utils
parentc7faf2e16b684f3dd0246dbdb662b1826dd24571 (diff)
parent3205a92ad872f918c8322cdcd1434c231a1fd251 (diff)
Merge pull request #36311 from reduz/poolvector-deprecation
Convert all references and instances of PoolVector to Vector
Diffstat (limited to 'modules/mono/utils')
-rw-r--r--modules/mono/utils/string_utils.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/mono/utils/string_utils.cpp b/modules/mono/utils/string_utils.cpp
index 911ac5c4a3..49c4fb3f73 100644
--- a/modules/mono/utils/string_utils.cpp
+++ b/modules/mono/utils/string_utils.cpp
@@ -162,22 +162,22 @@ String escape_csharp_keyword(const String &p_name) {
#endif
Error read_all_file_utf8(const String &p_path, String &r_content) {
- PoolVector<uint8_t> sourcef;
+ Vector<uint8_t> sourcef;
Error err;
FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err);
ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot open file '" + p_path + "'.");
int len = f->get_len();
sourcef.resize(len + 1);
- PoolVector<uint8_t>::Write w = sourcef.write();
- int r = f->get_buffer(w.ptr(), len);
+ uint8_t *w = sourcef.ptrw();
+ int r = f->get_buffer(w, len);
f->close();
memdelete(f);
ERR_FAIL_COND_V(r != len, ERR_CANT_OPEN);
w[len] = 0;
String source;
- if (source.parse_utf8((const char *)w.ptr())) {
+ if (source.parse_utf8((const char *)w)) {
ERR_FAIL_V(ERR_INVALID_DATA);
}