This was a case of three bad reviewers.
When you reject a suggested edit as “spam or vandalism”, it trains the spam filter to think that the IP address or network it originates from is used by spammers. Like a spam or offensive flag, this must not be used lightly, it must be used only in cases where the origin of the edit is clearly unproductive and undesirable. It must never be used in the case of an incorrect edit, any more than a spam flag on an answer that is merely incorrect or unhelpful.
piojo, don't worry about your account: once you reach a few hundred reputation points, the spam filter won't restrict you. This could be a problem for a newer user however.
As to whether the edit should have been rejected at all, it depends whether the edit was correct. I don't have the technical competence to judge. In general, removing an unnecessary cast is a good edit. From the help center:
When should I edit posts?
- To clarify the meaning of the post (without changing that meaning)
- To correct minor mistakes or add updates as the post ages
Removing casts tends to make code easier to read and maintain, so it is to be encouraged, providing of course that the cast is truly unnecessary. If the cast was necessary, then “clearly conflicts with author's intent” would have been the correct rejection reason (the intent being to post correct code), or “causes harm” with an explanation of why the cast was necessary.