File tree 2 files changed +51
-10
lines changed
2 files changed +51
-10
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,10 @@ BuildEnlivengine()
133
133
134
134
Tests ()
135
135
{
136
+ # Ensures they are both up to date
137
+ cmake --build build --target EnlivengineTests --config $config
138
+ cmake --build build --target PlatformExample --config $config
139
+
136
140
if [[ " $platform " == " windows" ]]; then
137
141
./build/examples/$config /PlatformExample.exe # default path for Visual Studio users
138
142
./build/tests/$config /EnlivengineTests.exe # default path for Visual Studio users
@@ -182,19 +186,46 @@ build=false
182
186
tests=false
183
187
visual=false
184
188
189
+ default=true
190
+
185
191
# Options parsing
186
192
while getopts c:higsbtva option
187
193
do
188
194
case $option in
189
- c) config=$OPTARG ;;
190
- h) help=true;;
191
- i) install=true;;
192
- g) generate=true;;
193
- s) shaders=true;;
194
- b) build=true;;
195
- t) tests=true;;
196
- v) visual=true;;
195
+ c)
196
+ default=false
197
+ config=$OPTARG
198
+ ;;
199
+ h)
200
+ default=false
201
+ help=true
202
+ ;;
203
+ i)
204
+ default=false
205
+ install=true
206
+ ;;
207
+ g)
208
+ default=false
209
+ generate=true
210
+ ;;
211
+ s)
212
+ default=false
213
+ shaders=true
214
+ ;;
215
+ b)
216
+ default=false
217
+ build=true
218
+ ;;
219
+ t)
220
+ default=false
221
+ tests=true
222
+ ;;
223
+ v)
224
+ default=false
225
+ visual=true
226
+ ;;
197
227
a)
228
+ default=false
198
229
install=true
199
230
generate=true
200
231
shaders=true
205
236
done
206
237
# echo "=> $config"
207
238
239
+ # If no arguments, consider it as -a
240
+ if $default ; then
241
+ install=true
242
+ generate=true
243
+ shaders=true
244
+ build=true
245
+ tests=true
246
+ fi
247
+
248
+ # Handle options
208
249
if $help ; then
209
250
Help
210
251
fi
Original file line number Diff line number Diff line change @@ -44,10 +44,10 @@ class Hash
44
44
const U32 length = static_cast <U32>(str.size ());
45
45
if (length > 0 )
46
46
{
47
- U32 h = 89 ;
47
+ U32 h = 5381 ;
48
48
for (U32 i = 0 ; i < length; ++i)
49
49
{
50
- h = h * 33 + static_cast <U32>(str[i]);
50
+ h = h * 5 + static_cast <U32>(str[i]);
51
51
}
52
52
return h;
53
53
}
You can’t perform that action at this time.
0 commit comments