Compare “Main” post ID to ID inside wp_query loop

Figured it out, but not sure if it’s the best way or not. I got the id of the current post in the loop and then used is_single to figure out which post was being displayed, then gave if the styling. The problem was, this was also carrying over to the next itteration of the loop and altering that styling as well. To fix that I just rest the $style variable to null at the end of the loop.

$curID = get_the_ID(); 
                     if (is_single($curID) == true) {
                        $style="style="border: 1px solid #fff;"";
                        } 
//Stuff here?>

<?php $style=""; ?>