It seems that far too many have the mindset that they need to earn food through exercise. And that makes me so sad because that isn't how it should be... if anything you should eat enough so that you have energy to live and exercise if that's what you enjoy. Not force yourself through workouts you hate just so that you can eat potatoes for lunch and not just plain salad.
Your body needs energy everyday no matter what you do. Of course when you do more or exercise your more will need more energy, but generally speaking most people need around 1600-2500 kcal just from their lifestyle and being alive. And then even more calories if they do workout. You should not restrict yourself because you think you haven't earned food or worked out hard enough, that is a destructive and unhealthy mindset.
Food is an everyday thing which you need. And you can still eat chocolate or ice cream even if you don't exercise. It is just energy which your body will use to keep you alive. If you panic over eating an ice cream even though you haven't worked out, then you definitely need to reevaluate your thoughts and behaviours regarding exercise and why you do it. Your body uses energy and in all honesty it doesn't know the difference between a an ice cream cone or if it's a fruit salad with full fat greek yoghurt.
And even if you go over your calorie need for a day or even a few days it really doesn't make so much of a difference. You won't suddenly gain lots of weight. If anything get rid of the scale as it doesn't mean anything and all it can do is give you a number which means very little. For example if I eat more salt, drink more water, am stressed or just eat a huge meal before I weigh myself then I can weigh anything from 0,5-2,5kg heavier and it's not actual weight just water weight (not that it would really matter, but wanting to show a point )
If you ever wonder if you deserve a food the answer is yes, you deserve it. Doesn't matter if you have been in bed all day or out running about in town, you deserve food. Everyone needs different amounts but nobody needs to restrict just because they haven't done so much -unless it's due to a thyroid problem.
Eat, enjoy the food and don't exercise to compensate. Instead exercise should be something enjoyed and something done with energy and not with the intention or burning calories just so that you can eat dinner.