Yes, its okay to make change pin settings directly. This in turn changes the value of the defined register (in this case the value of GPIO_PRTx_PC). This is done to make the task easier. Directly changing the register value can be used to configure components during runtime.
Thank you for your answer.