mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Clean up Strfnd
Changes: * Fix indentation. * Pass strings by const reference. * Merge Strfnd and WStrfnd into one class instead of copying them. * Remove trailing spaces. * Fix variable names. * Move to util. * Other miscellaneous style fixes.
This commit is contained in:
parent
eb7db21d50
commit
93887043d9
14 changed files with 103 additions and 198 deletions
|
@ -28,7 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "nodedef.h"
|
||||
#include "serialization.h"
|
||||
#include "server.h"
|
||||
#include "strfnd.h"
|
||||
#include "util/strfnd.h"
|
||||
#include "network/clientopcodes.h"
|
||||
#include "util/serialize.h"
|
||||
#include "util/srp.h"
|
||||
|
@ -641,7 +641,7 @@ void Client::handleCommand_AnnounceMedia(NetworkPacket* pkt)
|
|||
*pkt >> str;
|
||||
|
||||
Strfnd sf(str);
|
||||
while(!sf.atend()) {
|
||||
while(!sf.at_end()) {
|
||||
std::string baseurl = trim(sf.next(","));
|
||||
if (baseurl != "")
|
||||
m_media_downloader->addRemoteServer(baseurl);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue