Change parameter type from pointer to array
This commit is contained in:
parent
3740769a01
commit
620cdd25ac
2 changed files with 4 additions and 4 deletions
|
@ -13,7 +13,7 @@ void StreamCommunicator::sendMessage(int *values, __SIZE_TYPE__ numberOfValues)
|
|||
stream.println(message);
|
||||
}
|
||||
|
||||
void StreamCommunicator::sendMessage(char *message)
|
||||
void StreamCommunicator::sendMessage(const char message[])
|
||||
{
|
||||
stream.println(message);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ __SIZE_TYPE__ StreamCommunicator::calculateMessageOutSize(__SIZE_TYPE__ numberOf
|
|||
return numberOfValues + (numberOfValues - 1) + 1;
|
||||
}
|
||||
|
||||
void StreamCommunicator::parseIDs(int *values, __SIZE_TYPE__ numberOfValues, char *output)
|
||||
void StreamCommunicator::parseIDs(const int values[], __SIZE_TYPE__ numberOfValues, char *output)
|
||||
{
|
||||
__SIZE_TYPE__ outputSize = calculateMessageOutSize(numberOfValues);
|
||||
__SIZE_TYPE__ outputCharPointer = 0;
|
||||
|
|
|
@ -7,12 +7,12 @@ protected:
|
|||
char *messageBuffer;
|
||||
__SIZE_TYPE__ bufferSize;
|
||||
__SIZE_TYPE__ calculateMessageOutSize(__SIZE_TYPE__ numberOfValues);
|
||||
void parseIDs(int *values, __SIZE_TYPE__ numberOfValues, char *out);
|
||||
void parseIDs(const int values[], __SIZE_TYPE__ numberOfValues, char *out);
|
||||
|
||||
public:
|
||||
StreamCommunicator(Stream &s_out, __SIZE_TYPE__ bufferSize);
|
||||
void sendMessage(int *values, __SIZE_TYPE__ numberOfValues);
|
||||
void sendMessage(char *message);
|
||||
void sendMessage(const char message[]);
|
||||
char *receiveMessage();
|
||||
char *getBuffer();
|
||||
int getBufferSize();
|
||||
|
|
Reference in a new issue