473,386 Members | 1,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

useless function

Hello,

Consider the following function RTest::String:

-----------------------------------------

http://www.symbian.com/developer/tec...3aString%28%29

static inline const TAny *String(TInt aSel, const TText8 *aBuf1, const
TText16 *aBuf2);

Description

Utility function that returns a pointer to the specified TText8*
argument or the TText16* argument depending on the value of the aSel
argument.

-----------------------------------------

Anyone see any use for such a function? I cannot imagine what it could
be used for.
Ideas concerning any useful use/application of this function
appreciated.

Thanks,

JG

Nov 20 '06 #1
1 1588
John Goche wrote:
Consider the following function RTest::String:

-----------------------------------------

http://www.symbian.com/developer/tec...3aString%28%29

static inline const TAny *String(TInt aSel, const TText8 *aBuf1, const
TText16 *aBuf2);

Description

Utility function that returns a pointer to the specified TText8*
argument or the TText16* argument depending on the value of the aSel
argument.

-----------------------------------------

Anyone see any use for such a function? I cannot imagine what it could
be used for.
Ideas concerning any useful use/application of this function
appreciated.
You should ask about Symbian functions on a forum that deals with them
directly. This group deals with the C++ *language*, not third-party
libraries (see
http://www.parashift.com/c++-faq-lit....html#faq-5.9).

[OT]I'd guess it allows you to select between an 8-bit text buffer and
a 16-bit text buffer. One could do the same with the ternary operator:

const TAny* const text = ( aSel ? aBuf1 : aBuf2 );

I presume the intent is to supply a little implicit documentation on
the purpose of the code, though I don't see it as all that helpful.
TAny, BTW, is just void, and converting to a void pointer is generally
frowned upon in C++ since it is not type-safe.[/OT]

Cheers! --M

Nov 20 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

46
by: Matt Gostick | last post by:
Well, it's not useless, it just doesn't seem to be working for me. Basically, when I'm returning a pointer from a function, free does not seem to be freeing the memory for me. Here is an example...
6
by: Matt Gostick | last post by:
It was my pthreads that were leaking.. not my string ops. doh. I added pthread_join after my pthread_create and I have no more problems. Perhaps this is not the correct group to ask, but from...
26
by: Michi Henning | last post by:
I've been having problem with destructors in the context of having ported C# code developed under .NET to Mono. What happens is that, on a dual-CPU machine, various parts of the code crash randomly...
122
by: C.L. | last post by:
I was looking for a function or method that would return the index to the first matching element in a list. Coming from a C++ STL background, I thought it might be called "find". My first stop was...
3
by: fuchsia555 | last post by:
hi is there a code to crop bottom border from an image when creating thumbnail for this image without crop the original image , but just crop 15px bottom border for creating the thumbnails for the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.