From ba18d2f0d9078b81197d4c234bec1e6599e9f9d6 Mon Sep 17 00:00:00 2001 From: "Jill \"oatmealine\" Monoids" Date: Thu, 5 Jan 2023 19:07:44 +0300 Subject: [PATCH] the tiniest microoptimization --- public/template/index.ecr | 2 +- public/template/levels.ecr | 2 +- src/endpoints/misc/getRewards.cr | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/template/index.ecr b/public/template/index.ecr index e34d7a2..30b4852 100644 --- a/public/template/index.ecr +++ b/public/template/index.ecr @@ -12,7 +12,7 @@ crystal-gauntlet
<%= - strings = [ + strings = StaticArray[ "did yoy know? 50 Kilometers Remaining", "Fun Basil Fact: If you start running now, you may be fast enough", "Made in Yugoslavia", diff --git a/public/template/levels.ecr b/public/template/levels.ecr index 96c0df2..f7bad2d 100644 --- a/public/template/levels.ecr +++ b/public/template/levels.ecr @@ -64,7 +64,7 @@ <%- levels.each do |id, name, username, difficulty_community, difficulty_set, featured, epic| -%>
<%= - difficulties = [ + difficulties = StaticArray[ "auto", "easy", "normal", diff --git a/src/endpoints/misc/getRewards.cr b/src/endpoints/misc/getRewards.cr index 22a5ced..c44ac17 100644 --- a/src/endpoints/misc/getRewards.cr +++ b/src/endpoints/misc/getRewards.cr @@ -17,7 +17,7 @@ private def get_rand(type : String, large = false) ((Random.rand(min.to_f .. (max.to_f + 1)) / increment).floor() * increment).to_i end -private REWARD_TYPES = ["orbs", "diamonds", "shards", "keys"] +private REWARD_TYPES = StaticArray["orbs", "diamonds", "shards", "keys"] private def get_chest(account_id : Int32, large = false) : {Int32?, Int32?} begin