forked from soutade/libgourou
Some code formating
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
|
||||
namespace macaron {
|
||||
|
||||
class Base64 {
|
||||
class Base64 {
|
||||
public:
|
||||
|
||||
static std::string Encode(const std::string data) {
|
||||
@@ -126,7 +126,7 @@ class Base64 {
|
||||
return "";
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace gourou
|
||||
* 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 RSA_KEY_SIZE = 128;
|
||||
@@ -135,15 +135,15 @@ namespace gourou
|
||||
DRM_INVALID_USER
|
||||
};
|
||||
|
||||
#ifndef _NOEXCEPT
|
||||
#if __STDC_VERSION__ >= 201112L
|
||||
# define _NOEXCEPT noexcept
|
||||
# define _NOEXCEPT_(x) noexcept(x)
|
||||
#else
|
||||
# define _NOEXCEPT throw()
|
||||
# define _NOEXCEPT_(x)
|
||||
#endif
|
||||
#endif /* !_NOEXCEPT */
|
||||
#ifndef _NOEXCEPT
|
||||
#if __STDC_VERSION__ >= 201112L
|
||||
# define _NOEXCEPT noexcept
|
||||
# define _NOEXCEPT_(x) noexcept(x)
|
||||
#else
|
||||
# define _NOEXCEPT throw()
|
||||
# define _NOEXCEPT_(x)
|
||||
#endif
|
||||
#endif /* !_NOEXCEPT */
|
||||
|
||||
/**
|
||||
* Generic exception class
|
||||
|
||||
@@ -94,12 +94,12 @@ namespace gourou
|
||||
std::string FulfillmentItem::getMetadata(std::string name)
|
||||
{
|
||||
// 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(),
|
||||
[](unsigned char c){ return std::tolower(c); });
|
||||
#else
|
||||
#else
|
||||
std::transform(name.begin(), name.end(), name.begin(), tolower);
|
||||
#endif
|
||||
#endif
|
||||
name = std::string("dc:") + name;
|
||||
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
|
||||
|
||||
CXXFLAGS=-Wall -fPIC -I$(ROOT)/include
|
||||
CXXFLAGS=-Wall -fPIC -I$(ROOT)/include -fdata-sections -ffunction-sections
|
||||
|
||||
STATIC_DEP=
|
||||
# LDFLAGS += -Wl,--gc-sections
|
||||
LDFLAGS += -L$(ROOT) -lcrypto -lzip -lz -lcurl -lpugixml
|
||||
|
||||
ifneq ($(STATIC_UTILS),)
|
||||
@@ -31,7 +32,7 @@ COMMON_LIB = utils.a
|
||||
all: $(TARGETS)
|
||||
|
||||
${COMMON_LIB}: $(COMMON_DEPS)
|
||||
$(CXX) $(CXXFLAGS) $(COMMON_DEPS) $(LDFLAGS) -c
|
||||
$(CXX) $(CXXFLAGS) $(COMMON_DEPS) -c
|
||||
$(AR) crs $@ $(COMMON_OBJECTS)
|
||||
|
||||
%: %.cpp $(COMMON_LIB) $(STATIC_DEP)
|
||||
|
||||
Reference in New Issue
Block a user