mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[tidy] move loop variable declaration to loop
This commit is contained in:
@@ -146,8 +146,8 @@ NSString *DescriptionForObject(NSObject *object, id locale, NSUInteger indent)
|
||||
- (NSString *)descriptionWithLocale:(id)locale indent:(NSUInteger)level
|
||||
{
|
||||
NSMutableString *indentString = [NSMutableString string];
|
||||
NSUInteger i, count = level;
|
||||
for (i = 0; i < count; i++)
|
||||
NSUInteger count = level;
|
||||
for (NSUInteger i = 0; i < count; i++)
|
||||
{
|
||||
[indentString appendFormat:@" "];
|
||||
}
|
||||
|
||||
@@ -108,12 +108,11 @@
|
||||
withSeparator:(NSString *)sep
|
||||
afterNthChar:(int)sepnth
|
||||
{
|
||||
int i;
|
||||
NSMutableString *result;
|
||||
NSString *immutableResult;
|
||||
|
||||
result = [[NSMutableString alloc] init];
|
||||
for (i = 0; i < size; i++)
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
if (i && sep && sepnth && i % sepnth == 0)
|
||||
[result appendString:sep];
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
UINT ios_cliprdr_send_client_format_list(CliprdrClientContext *cliprdr)
|
||||
{
|
||||
UINT rc = ERROR_INTERNAL_ERROR;
|
||||
UINT32 index;
|
||||
UINT32 formatId;
|
||||
UINT32 numFormats;
|
||||
UINT32 *pFormatIds;
|
||||
@@ -57,7 +56,7 @@ UINT ios_cliprdr_send_client_format_list(CliprdrClientContext *cliprdr)
|
||||
if (!formats)
|
||||
goto fail;
|
||||
|
||||
for (index = 0; index < numFormats; index++)
|
||||
for (UINT32 index = 0; index < numFormats; index++)
|
||||
{
|
||||
formatId = pFormatIds[index];
|
||||
formatName = ClipboardGetFormatName(afc->clipboard, formatId);
|
||||
@@ -167,7 +166,6 @@ static UINT ios_cliprdr_monitor_ready(CliprdrClientContext *cliprdr,
|
||||
static UINT ios_cliprdr_server_capabilities(CliprdrClientContext *cliprdr,
|
||||
const CLIPRDR_CAPABILITIES *capabilities)
|
||||
{
|
||||
UINT32 index;
|
||||
CLIPRDR_CAPABILITY_SET *capabilitySet;
|
||||
mfContext *afc;
|
||||
|
||||
@@ -179,7 +177,7 @@ static UINT ios_cliprdr_server_capabilities(CliprdrClientContext *cliprdr,
|
||||
if (!afc)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
for (index = 0; index < capabilities->cCapabilitiesSets; index++)
|
||||
for (UINT32 index = 0; index < capabilities->cCapabilitiesSets; index++)
|
||||
{
|
||||
capabilitySet = &(capabilities->capabilitySets[index]);
|
||||
|
||||
@@ -205,7 +203,6 @@ static UINT ios_cliprdr_server_format_list(CliprdrClientContext *cliprdr,
|
||||
const CLIPRDR_FORMAT_LIST *formatList)
|
||||
{
|
||||
UINT rc;
|
||||
UINT32 index;
|
||||
CLIPRDR_FORMAT *format;
|
||||
mfContext *afc;
|
||||
|
||||
@@ -219,7 +216,7 @@ static UINT ios_cliprdr_server_format_list(CliprdrClientContext *cliprdr,
|
||||
|
||||
if (afc->serverFormats)
|
||||
{
|
||||
for (index = 0; index < afc->numServerFormats; index++)
|
||||
for (UINT32 index = 0; index < afc->numServerFormats; index++)
|
||||
free(afc->serverFormats[index].formatName);
|
||||
|
||||
free(afc->serverFormats);
|
||||
@@ -236,7 +233,7 @@ static UINT ios_cliprdr_server_format_list(CliprdrClientContext *cliprdr,
|
||||
if (!afc->serverFormats)
|
||||
return CHANNEL_RC_NO_MEMORY;
|
||||
|
||||
for (index = 0; index < afc->numServerFormats; index++)
|
||||
for (UINT32 index = 0; index < afc->numServerFormats; index++)
|
||||
{
|
||||
afc->serverFormats[index].formatId = formatList->formats[index].formatId;
|
||||
afc->serverFormats[index].formatName = NULL;
|
||||
@@ -252,7 +249,7 @@ static UINT ios_cliprdr_server_format_list(CliprdrClientContext *cliprdr,
|
||||
|
||||
BOOL unicode = FALSE;
|
||||
BOOL text = FALSE;
|
||||
for (index = 0; index < afc->numServerFormats; index++)
|
||||
for (UINT32 index = 0; index < afc->numServerFormats; index++)
|
||||
{
|
||||
format = &(afc->serverFormats[index]);
|
||||
|
||||
@@ -368,7 +365,6 @@ ios_cliprdr_server_format_data_response(CliprdrClientContext *cliprdr,
|
||||
{
|
||||
BYTE *data;
|
||||
UINT32 size;
|
||||
UINT32 index;
|
||||
UINT32 formatId;
|
||||
CLIPRDR_FORMAT *format = NULL;
|
||||
mfContext *afc;
|
||||
@@ -387,7 +383,7 @@ ios_cliprdr_server_format_data_response(CliprdrClientContext *cliprdr,
|
||||
if (!instance)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
for (index = 0; index < afc->numServerFormats; index++)
|
||||
for (UINT32 index = 0; index < afc->numServerFormats; index++)
|
||||
{
|
||||
if (afc->requestedFormatId == afc->serverFormats[index].formatId)
|
||||
format = &(afc->serverFormats[index]);
|
||||
|
||||
@@ -69,9 +69,7 @@ static BOOL addFlag(int *argc, char ***argv, const char *str, BOOL flag)
|
||||
|
||||
static void freeArguments(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
for (int i = 0; i < argc; i++)
|
||||
free(argv[i]);
|
||||
|
||||
free(argv);
|
||||
|
||||
@@ -78,12 +78,11 @@
|
||||
_pointer_scrolling = NO;
|
||||
|
||||
// create areas array
|
||||
int i, j;
|
||||
CGFloat area_width = [_cur_pointer_img size].width / 3.0f;
|
||||
CGFloat area_height = [_cur_pointer_img size].height / 3.0f;
|
||||
for (i = 0; i < 3; i++)
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
for (j = 0; j < 3; j++)
|
||||
for (int j = 0; j < 3; j++)
|
||||
{
|
||||
_pointer_areas[j + i * 3] =
|
||||
CGRectMake(j * area_width, i * area_height, area_width, area_height);
|
||||
|
||||
Reference in New Issue
Block a user