@@ -39,7 +39,7 @@ enum class Prop {
3939 Float64Array, // "Float64Array"
4040};
4141
42- class PropNameIDCache {
42+ class MGLPropNameIDCache {
4343 public:
4444 const jsi::PropNameID &get (jsi::Runtime &runtime, Prop prop) {
4545 auto key = reinterpret_cast <uintptr_t >(&runtime);
@@ -65,16 +65,16 @@ class PropNameIDCache {
6565 jsi::PropNameID createProp (jsi::Runtime &runtime, Prop prop);
6666};
6767
68- PropNameIDCache propNameIDCache;
68+ MGLPropNameIDCache propNameIDCache;
6969
70- InvalidateCacheOnDestroy::InvalidateCacheOnDestroy (jsi::Runtime &runtime) {
70+ MGLInvalidateCacheOnDestroy::MGLInvalidateCacheOnDestroy (jsi::Runtime &runtime) {
7171 key = reinterpret_cast <uintptr_t >(&runtime);
7272}
73- InvalidateCacheOnDestroy ::~InvalidateCacheOnDestroy () {
73+ MGLInvalidateCacheOnDestroy ::~MGLInvalidateCacheOnDestroy () {
7474 propNameIDCache.invalidate (key);
7575}
7676
77- MGLTypedArrayKind getTypedArrayKindForName (const std::string &name);
77+ MGLTypedArrayKind MGLgetTypedArrayKindForName (const std::string &name);
7878
7979MGLTypedArrayBase::MGLTypedArrayBase (jsi::Runtime &runtime, size_t size,
8080 MGLTypedArrayKind kind)
@@ -101,7 +101,7 @@ MGLTypedArrayKind MGLTypedArrayBase::getKind(jsi::Runtime &runtime) const {
101101 .getProperty (runtime, propNameIDCache.get (runtime, Prop::Name))
102102 .asString (runtime)
103103 .utf8 (runtime);
104- return getTypedArrayKindForName (constructorName);
104+ return MGLgetTypedArrayKindForName (constructorName);
105105}
106106
107107size_t MGLTypedArrayBase::size (jsi::Runtime &runtime) const {
@@ -147,7 +147,7 @@ jsi::ArrayBuffer MGLTypedArrayBase::getBuffer(jsi::Runtime &runtime) const {
147147 }
148148}
149149
150- bool isTypedArray (jsi::Runtime &runtime, const jsi::Object &jsObj) {
150+ bool MGLisTypedArray (jsi::Runtime &runtime, const jsi::Object &jsObj) {
151151 auto jsVal =
152152 runtime.global ()
153153 .getProperty (runtime, propNameIDCache.get (runtime, Prop::ArrayBuffer))
@@ -164,7 +164,7 @@ bool isTypedArray(jsi::Runtime &runtime, const jsi::Object &jsObj) {
164164 }
165165}
166166
167- MGLTypedArrayBase getTypedArray (jsi::Runtime &runtime,
167+ MGLTypedArrayBase MGLgetTypedArray (jsi::Runtime &runtime,
168168 const jsi::Object &jsObj) {
169169 auto jsVal =
170170 runtime.global ()
@@ -182,7 +182,7 @@ MGLTypedArrayBase getTypedArray(jsi::Runtime &runtime,
182182 }
183183}
184184
185- std::vector<uint8_t > arrayBufferToVector (jsi::Runtime &runtime,
185+ std::vector<uint8_t > MGLarrayBufferToVector (jsi::Runtime &runtime,
186186 jsi::Object &jsObj) {
187187 if (!jsObj.isArrayBuffer (runtime)) {
188188 throw std::runtime_error (" Object is not an ArrayBuffer" );
@@ -197,7 +197,7 @@ std::vector<uint8_t> arrayBufferToVector(jsi::Runtime &runtime,
197197 return std::vector<uint8_t >(dataBlock, dataBlock + blockSize);
198198}
199199
200- void arrayBufferUpdate (jsi::Runtime &runtime, jsi::ArrayBuffer &buffer,
200+ void MGLarrayBufferUpdate (jsi::Runtime &runtime, jsi::ArrayBuffer &buffer,
201201 std::vector<uint8_t > data, size_t offset) {
202202 uint8_t *dataBlock = buffer.data (runtime);
203203 size_t blockSize = buffer.size (runtime);
@@ -257,7 +257,7 @@ uint8_t* MGLTypedArray<T>::data(jsi::Runtime &runtime) {
257257 return getBuffer (runtime).data (runtime) + byteOffset (runtime);
258258}
259259
260- const jsi::PropNameID &PropNameIDCache ::getConstructorNameProp (
260+ const jsi::PropNameID &MGLPropNameIDCache ::getConstructorNameProp (
261261 jsi::Runtime &runtime, MGLTypedArrayKind kind) {
262262 switch (kind) {
263263 case MGLTypedArrayKind::Int8Array:
@@ -281,7 +281,7 @@ const jsi::PropNameID &PropNameIDCache::getConstructorNameProp(
281281 }
282282}
283283
284- jsi::PropNameID PropNameIDCache ::createProp (jsi::Runtime &runtime, Prop prop) {
284+ jsi::PropNameID MGLPropNameIDCache ::createProp (jsi::Runtime &runtime, Prop prop) {
285285 auto create = [&](const std::string &propName) {
286286 return jsi::PropNameID::forUtf8 (runtime, propName);
287287 };
@@ -337,7 +337,7 @@ std::unordered_map<std::string, MGLTypedArrayKind> nameToKindMap = {
337337 {" Float64Array" , MGLTypedArrayKind::Float64Array},
338338};
339339
340- MGLTypedArrayKind getTypedArrayKindForName (const std::string &name) {
340+ MGLTypedArrayKind MGLgetTypedArrayKindForName (const std::string &name) {
341341 return nameToKindMap.at (name);
342342}
343343
0 commit comments