[Saga-devel] saga SVN commit 3325:
/trunk/saga/saga/adaptors/utils/
Hartmut Kaiser
hkaiser at cct.lsu.edu
Sat Jan 17 14:29:39 CST 2009
> User: amerzky
> Date: 2009/01/17 10:50 AM
>
> Modified:
> /trunk/saga/saga/adaptors/utils/
> utils.cpp
>
> Log:
> empty host is assumed local
> A
>
> File Changes:
>
> Directory: /trunk/saga/saga/adaptors/utils/
> ===========================================
>
> File [modified]: utils.cpp
> Delta lines: +5 -0
> ===================================================================
> --- trunk/saga/saga/adaptors/utils/utils.cpp 2009-01-17 16:37:19 UTC
> (rev 3324)
> +++ trunk/saga/saga/adaptors/utils/utils.cpp 2009-01-17 16:50:09 UTC
> (rev 3325)
> @@ -144,6 +144,11 @@
>
> bool host_is_localhost (std::string host)
> {
> + if ( host == "" )
Please write this kind of constructs as
if (host.empty())
which is more efficient as no additional std::string needs to be created
temporarily from the "".
Regards Hartmut
> + {
> + return true;
> + }
> +
> std::vector <std::string> localhosts = get_localhosts ();
> for ( int i = 0; i < localhosts.size (); i++ )
> {
>
> _______________________________________________
> saga-devel mailing list
> saga-devel at cct.lsu.edu
> https://mail.cct.lsu.edu/mailman/listinfo/saga-devel
More information about the saga-devel
mailing list