Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 2 files). Show all
Unified · Split
| @@ -94,19 +94,8 @@ ScriptEngine::ScriptEngine(const QString& scriptContents, const QString& fileNam · 93 unmodified lines | ||
| 94 | 94 | _vec3Library(), |
| 95 | 95 | _uuidLibrary(), |
| 96 | 96 | _animationCache(this), |
| 97 | − _arrayBufferClass(NULL) | |
| 97 | + _arrayBufferClass(new ArrayBufferClass(this)) | |
| 98 | 98 | { |
| 99 | − _arrayBufferClass = new ArrayBufferClass(this); | |
| 100 | − new DataViewClass(this); | |
| 101 | − new Int8ArrayClass(this); | |
| 102 | − new Uint8ArrayClass(this); | |
| 103 | − new Uint8ClampedArrayClass(this); | |
| 104 | − new Int16ArrayClass(this); | |
| 105 | − new Uint16ArrayClass(this); | |
| 106 | − new Int32ArrayClass(this); | |
| 107 | − new Uint32ArrayClass(this); | |
| 108 | − new Float32ArrayClass(this); | |
| 109 | − new Float64ArrayClass(this); | |
| 110 | 99 | } |
| 111 | 100 | |
| 112 | 101 | ScriptEngine::ScriptEngine(const QUrl& scriptURL, |
| @@ -131,25 +120,13 @@ ScriptEngine::ScriptEngine(const QUrl& scriptURL, · 18 unmodified lines | ||
| 131 | 120 | _vec3Library(), |
| 132 | 121 | _uuidLibrary(), |
| 133 | 122 | _animationCache(this), |
| 134 | − _arrayBufferClass(NULL) | |
| 123 | + _arrayBufferClass(new ArrayBufferClass(this)) | |
| 135 | 124 | { |
| 136 | 125 | QString scriptURLString = scriptURL.toString(); |
| 137 | 126 | _fileNameString = scriptURLString; |
| 138 | 127 | |
| 139 | 128 | QUrl url(scriptURL); |
| 140 | 129 | |
| 141 | − _arrayBufferClass = new ArrayBufferClass(this); | |
| 142 | − new DataViewClass(this); | |
| 143 | − new Int8ArrayClass(this); | |
| 144 | − new Uint8ArrayClass(this); | |
| 145 | − new Uint8ClampedArrayClass(this); | |
| 146 | − new Int16ArrayClass(this); | |
| 147 | − new Uint16ArrayClass(this); | |
| 148 | − new Int32ArrayClass(this); | |
| 149 | − new Uint32ArrayClass(this); | |
| 150 | − new Float32ArrayClass(this); | |
| 151 | − new Float64ArrayClass(this); | |
| 152 | − | |
| 153 | 130 | // if the scheme length is one or lower, maybe they typed in a file, let's try |
| 154 | 131 | const int WINDOWS_DRIVE_LETTER_SIZE = 1; |
| 155 | 132 | if (url.scheme().size() <= WINDOWS_DRIVE_LETTER_SIZE) { |