Consistently name property max/min functions and add step/default.

This commit is contained in:
Peter Johnson
2016-09-16 21:00:19 -07:00
parent 9bb37d5df0
commit c606671d27
10 changed files with 100 additions and 22 deletions

View File

@@ -92,20 +92,34 @@ void SetDoubleProperty(CS_Property property, double value, CS_Status* status) {
source->SetDoubleProperty(propertyIndex, value);
}
double GetDoublePropertyMin(CS_Property property, CS_Status* status) {
double GetPropertyMin(CS_Property property, CS_Status* status) {
int propertyIndex;
auto source = GetPropertySource(property, &propertyIndex, status);
if (!source) return 0.0;
return source->GetPropertyMin(propertyIndex);
}
double GetDoublePropertyMax(CS_Property property, CS_Status* status) {
double GetPropertyMax(CS_Property property, CS_Status* status) {
int propertyIndex;
auto source = GetPropertySource(property, &propertyIndex, status);
if (!source) return 0.0;
return source->GetPropertyMax(propertyIndex);
}
double GetPropertyStep(CS_Property property, CS_Status* status) {
int propertyIndex;
auto source = GetPropertySource(property, &propertyIndex, status);
if (!source) return 0.0;
return source->GetPropertyStep(propertyIndex);
}
double GetPropertyDefault(CS_Property property, CS_Status* status) {
int propertyIndex;
auto source = GetPropertySource(property, &propertyIndex, status);
if (!source) return 0.0;
return source->GetPropertyDefault(propertyIndex);
}
std::string GetStringProperty(CS_Property property, CS_Status* status) {
llvm::SmallString<128> value;
int propertyIndex;