Some code formating
This commit is contained in:
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
namespace macaron {
|
namespace macaron {
|
||||||
|
|
||||||
class Base64 {
|
class Base64 {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static std::string Encode(const std::string data) {
|
static std::string Encode(const std::string data) {
|
||||||
@@ -126,7 +126,7 @@ class Base64 {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ namespace gourou
|
|||||||
* Some common utilities
|
* Some common utilities
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define ADOBE_ADEPT_NS "http://ns.adobe.com/adept"
|
#define ADOBE_ADEPT_NS "http://ns.adobe.com/adept"
|
||||||
|
|
||||||
static const int SHA1_LEN = 20;
|
static const int SHA1_LEN = 20;
|
||||||
static const int RSA_KEY_SIZE = 128;
|
static const int RSA_KEY_SIZE = 128;
|
||||||
@@ -135,15 +135,15 @@ namespace gourou
|
|||||||
DRM_INVALID_USER
|
DRM_INVALID_USER
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef _NOEXCEPT
|
#ifndef _NOEXCEPT
|
||||||
#if __STDC_VERSION__ >= 201112L
|
#if __STDC_VERSION__ >= 201112L
|
||||||
# define _NOEXCEPT noexcept
|
# define _NOEXCEPT noexcept
|
||||||
# define _NOEXCEPT_(x) noexcept(x)
|
# define _NOEXCEPT_(x) noexcept(x)
|
||||||
#else
|
#else
|
||||||
# define _NOEXCEPT throw()
|
# define _NOEXCEPT throw()
|
||||||
# define _NOEXCEPT_(x)
|
# define _NOEXCEPT_(x)
|
||||||
#endif
|
#endif
|
||||||
#endif /* !_NOEXCEPT */
|
#endif /* !_NOEXCEPT */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic exception class
|
* Generic exception class
|
||||||
|
|||||||
@@ -94,12 +94,12 @@ namespace gourou
|
|||||||
std::string FulfillmentItem::getMetadata(std::string name)
|
std::string FulfillmentItem::getMetadata(std::string name)
|
||||||
{
|
{
|
||||||
// https://stackoverflow.com/questions/313970/how-to-convert-an-instance-of-stdstring-to-lower-case
|
// https://stackoverflow.com/questions/313970/how-to-convert-an-instance-of-stdstring-to-lower-case
|
||||||
#if __STDC_VERSION__ >= 201112L
|
#if __STDC_VERSION__ >= 201112L
|
||||||
std::transform(name.begin(), name.end(), name.begin(),
|
std::transform(name.begin(), name.end(), name.begin(),
|
||||||
[](unsigned char c){ return std::tolower(c); });
|
[](unsigned char c){ return std::tolower(c); });
|
||||||
#else
|
#else
|
||||||
std::transform(name.begin(), name.end(), name.begin(), tolower);
|
std::transform(name.begin(), name.end(), name.begin(), tolower);
|
||||||
#endif
|
#endif
|
||||||
name = std::string("dc:") + name;
|
name = std::string("dc:") + name;
|
||||||
pugi::xpath_node path = metadatas.select_node(name.c_str());
|
pugi::xpath_node path = metadatas.select_node(name.c_str());
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,10 @@ TARGETS=$(TARGET_BINARIES) launcher
|
|||||||
|
|
||||||
MAN_PAGES=acsmdownloader adept_activate adept_remove adept_loan_mgt
|
MAN_PAGES=acsmdownloader adept_activate adept_remove adept_loan_mgt
|
||||||
|
|
||||||
CXXFLAGS=-Wall -fPIC -I$(ROOT)/include
|
CXXFLAGS=-Wall -fPIC -I$(ROOT)/include -fdata-sections -ffunction-sections
|
||||||
|
|
||||||
STATIC_DEP=
|
STATIC_DEP=
|
||||||
|
# LDFLAGS += -Wl,--gc-sections
|
||||||
LDFLAGS += -L$(ROOT) -lcrypto -lzip -lz -lcurl -lpugixml
|
LDFLAGS += -L$(ROOT) -lcrypto -lzip -lz -lcurl -lpugixml
|
||||||
|
|
||||||
ifneq ($(STATIC_UTILS),)
|
ifneq ($(STATIC_UTILS),)
|
||||||
@@ -31,7 +32,7 @@ COMMON_LIB = utils.a
|
|||||||
all: $(TARGETS)
|
all: $(TARGETS)
|
||||||
|
|
||||||
${COMMON_LIB}: $(COMMON_DEPS)
|
${COMMON_LIB}: $(COMMON_DEPS)
|
||||||
$(CXX) $(CXXFLAGS) $(COMMON_DEPS) $(LDFLAGS) -c
|
$(CXX) $(CXXFLAGS) $(COMMON_DEPS) -c
|
||||||
$(AR) crs $@ $(COMMON_OBJECTS)
|
$(AR) crs $@ $(COMMON_OBJECTS)
|
||||||
|
|
||||||
%: %.cpp $(COMMON_LIB) $(STATIC_DEP)
|
%: %.cpp $(COMMON_LIB) $(STATIC_DEP)
|
||||||
|
|||||||
Reference in New Issue
Block a user