From 855068de5a0ede469a81d7cd439805a8b084dcaa Mon Sep 17 00:00:00 2001 From: JustinAJ Date: Tue, 10 Jun 2014 19:45:31 -0400 Subject: [PATCH] Now using a lambda as the config loop condition instead of breaking. --- Jupiter/IRC_Client.cpp | 17 +++++++++-------- Release/Jupiter.lib | Bin 218500 -> 218500 bytes 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Jupiter/IRC_Client.cpp b/Jupiter/IRC_Client.cpp index 8a993f9..ae98896 100644 --- a/Jupiter/IRC_Client.cpp +++ b/Jupiter/IRC_Client.cpp @@ -856,24 +856,25 @@ int Jupiter::IRC::Client::primaryHandler() size_t offset; unsigned int i = 1; - while (true) + Jupiter::ReferenceString value; + auto config_loop_condition = [&] { offset = key.aformat("%u", i); - const Jupiter::ReadableString &value = Jupiter::IRC::Client::readConfigValue(key); - if (value.isEmpty()) break; + value = Jupiter::IRC::Client::readConfigValue(key); + return !value.isEmpty(); + }; + while (config_loop_condition()) + { key.truncate(offset); Jupiter::IRC::Client::send(value); i++; } key = "Channel."; i = 1; - while (true) + while (config_loop_condition()) { - offset = key.aformat("%u", i); - const Jupiter::ReadableString &tVal = Jupiter::IRC::Client::readConfigValue(key); - if (tVal.isEmpty()) break; key.truncate(offset); - Jupiter::IRC::Client::joinChannel(tVal); + Jupiter::IRC::Client::joinChannel(value); i++; } diff --git a/Release/Jupiter.lib b/Release/Jupiter.lib index 745430bcb3524badef7b21644d42047cfdfc4045..8a2191c1fa6fbe9920afb57b90f6adaf27d41dae 100644 GIT binary patch delta 16746 zcmahwdq9`v)xOW`1tkzfMU<;@5di@aZ>WHH4HZz+8Y6J7nRAA$nsY|t*F8s~zvP)Y z2dU<{Y0xRwa|{#JCqt|&;OBr ze!o)J_|w{8H8g5mZdSbiS2bY1rFsF>;={dq^-}tfQX}-oz12k*6~gOJ`=~HN72H>i z@}i2=r{7l*_(?DCr&hb0N;B*+wAj^8t#KC{URD0ZrXaP_U91ap7ANy&feLux37P1p6<+2@h${NHwR26I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