Nice work, but some comments:
On Wed, Feb 23, 2011 at 7:17 PM, Vijay Samuel <email address hidden> wrote: > - tmp= (char *) getenv("DRIZZLE_HOST"); > + tmp= const_cast<char *>(getenv("DRIZZLE_HOST"));
Why? Can't tmp be made const char*?
> - if (!((char*) (pagpoint))) > + if (!(const_cast<char *>((pagpoint))))
Why? pagpoint is already non-const.
> - len=(uint32_t) (end - name); > + len=static_cast<uint32_t>((end - name));
len should probably be size_t so these casts aren't necessary.
> - char *end_of_line=line+(uint32_t) strlen(line); > + char *end_of_line= line + static_cast<uint32_t>(strlen(line));
Why? It might be useful to check whether a cast is necessary in the first place.
Greetings,
Olaf
« Back to merge proposal
Nice work, but some comments:
On Wed, Feb 23, 2011 at 7:17 PM, Vijay Samuel <email address hidden> wrote: "DRIZZLE_ HOST"); "DRIZZLE_ HOST")) ;
> - tmp= (char *) getenv(
> + tmp= const_cast<char *>(getenv(
Why? Can't tmp be made const char*?
> - if (!((char*) (pagpoint)))
> + if (!(const_cast<char *>((pagpoint))))
Why? pagpoint is already non-const.
> - len=(uint32_t) (end - name); cast<uint32_ t>((end - name));
> + len=static_
len should probably be size_t so these casts aren't necessary.
> - char *end_of_ line=line+ (uint32_ t) strlen(line); cast<uint32_ t>(strlen( line));
> + char *end_of_line= line + static_
Why? It might be useful to check whether a cast is necessary in the first place.
Greetings,
Olaf