Although Wendy's (NASDAQ:WEN) second-quarter profit was itself notable, particularly after McDonald's own rather lackluster performance, it's the news that it is selling 425 of its restaurants that was the real eye-opener.

It's part of a growing trend among restaurant chains that on one hand signals a better economic climate and on the other will help Wendy's take part in another fad among fast-food restaurateurs, of taking their stores upscale.

Although the burger joint's sales inched up less than 1% in the quarter, Wendy's was still able to post profits of $12.2 million, or $0.03 per share, compared with the loss of $5.5 million, or $0.01 per share, it recorded in the year-ago period. Excluding non-recurring one-time items, the chain earned $0.08 per share, beating Wall Street's $0.06-per-share expectations.

Using this newfound financial muscle, the restaurant operator also said it was raising its dividend by 25% to $0.20 per share and would use the opportunity to add greater strength to its bottom line by selling a slew of stores to franchisees by the second quarter of 2014. That will reduce the company's ownership stake from 22% down to 15%.

It signals a somewhat healthier economy, too, if for no other reason than it suggests there's financing available for franchisees to buy the stores. Yet Wendy's is late to the game (and the economy was indeed picking up sooner), since a number of restaurant chains were doing the same thing last year. DineEquity was selling off blocks of its Applebee's restaurants, while Yum! Brands (NYSE:YUM) was shedding Taco Bell stores to franchisees.

And it's Yum! that's among the stores looking to reinvent their fast-food concepts into the fast-casual concept dominated by Panera Bread (NASDAQ:PNRA) and Chipotle Mexican Grill (NYSE:CMG), which have baked in some of the best performances over the past few years. Panera sales have grown at a 14% compounded annual growth rate over the past five years, with operating profits jumping 27% annually, while Chipotle's done even better, expanding revenues 20% over the same time period and growing earnings at a 30% clip.

While Yum!'s results have been decidedly anemic, Wendy's can actually say it's held its own: revenues up 15% annually over the past five years and operating profits almost 20% wider. The problem has been that in the past few years it's been unable to move the needle, recording negligible sales growth and alternating between minimal profits and losses. But its stock has still been among the top-performing restaurant chains.

WEN Chart

WEN data by YCharts.

By shedding its restaurants to franchisees, it will have an even more stable revenue stream coming in from them while lowering its own overhead. And Wendy's plans to use that influx of cash to modernize its restaurants and to refresh the decor to appeal to the more upscale dining market.

Wendy's stock has been a tasty treat for a while, and while it's risky to change what's working, it looks like this burger joint can still flip for investors.