Changeset 33464 in vbox for trunk/src/VBox/Runtime/r3/xml.cpp
- Timestamp:
- Oct 26, 2010 12:27:50 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 67055
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/xml.cpp
r33056 r33464 1045 1045 AttributeNode* ElementNode::setAttribute(const char *pcszName, int32_t i) 1046 1046 { 1047 char *psz = NULL; 1048 RTStrAPrintf(&psz, "%RI32", i); 1049 AttributeNode *p = setAttribute(pcszName, psz); 1050 RTStrFree(psz); 1047 char szValue[64]; 1048 RTStrPrintf(szValue, sizeof(szValue), "%RI32", i); 1049 AttributeNode *p = setAttribute(pcszName, szValue); 1051 1050 return p; 1052 1051 } 1053 1052 1054 AttributeNode* ElementNode::setAttribute(const char *pcszName, uint32_t i) 1055 { 1056 char *psz = NULL; 1057 RTStrAPrintf(&psz, "%RU32", i); 1058 AttributeNode *p = setAttribute(pcszName, psz); 1059 RTStrFree(psz); 1053 AttributeNode* ElementNode::setAttribute(const char *pcszName, uint32_t u) 1054 { 1055 char szValue[64]; 1056 RTStrPrintf(szValue, sizeof(szValue), "%RU32", u); 1057 AttributeNode *p = setAttribute(pcszName, szValue); 1060 1058 return p; 1061 1059 } … … 1063 1061 AttributeNode* ElementNode::setAttribute(const char *pcszName, int64_t i) 1064 1062 { 1065 char *psz = NULL; 1066 RTStrAPrintf(&psz, "%RI64", i); 1067 AttributeNode *p = setAttribute(pcszName, psz); 1068 RTStrFree(psz); 1063 char szValue[64]; 1064 RTStrPrintf(szValue, sizeof(szValue), "%RI64", i); 1065 AttributeNode *p = setAttribute(pcszName, szValue); 1069 1066 return p; 1070 1067 } 1071 1068 1072 AttributeNode* ElementNode::setAttribute(const char *pcszName, uint64_t i) 1073 { 1074 char *psz = NULL; 1075 RTStrAPrintf(&psz, "%RU64", i); 1076 AttributeNode *p = setAttribute(pcszName, psz); 1077 RTStrFree(psz); 1069 AttributeNode* ElementNode::setAttribute(const char *pcszName, uint64_t u) 1070 { 1071 char szValue[64]; 1072 RTStrPrintf(szValue, sizeof(szValue), "%RU64", u); 1073 AttributeNode *p = setAttribute(pcszName, szValue); 1078 1074 return p; 1079 1075 } 1080 1076 1081 AttributeNode* ElementNode::setAttributeHex(const char *pcszName, uint32_t i) 1082 { 1083 char *psz = NULL; 1084 RTStrAPrintf(&psz, "0x%RX32", i); 1085 AttributeNode *p = setAttribute(pcszName, psz); 1086 RTStrFree(psz); 1077 AttributeNode* ElementNode::setAttributeHex(const char *pcszName, uint32_t u) 1078 { 1079 char szValue[64]; 1080 RTStrPrintf(szValue, sizeof(szValue), "0x%RX32", u); 1081 AttributeNode *p = setAttribute(pcszName, szValue); 1087 1082 return p; 1088 1083 }
Note:
See TracChangeset
for help on using the changeset viewer.